#42 what is DLL Hell ?

GAC

In the above diagram,we have two application Applictaion1 and Application2 sharing a DLL Called SharedDLL.Both Application invokes a common function called SharedHello(Does not return and takes no parameter).

Let’s Assume Application2 want’s a parameter to be passed to SharedHello,so Now  the sharedhello takes one parameter as string,and the reference to SharedDLL is updated by Application2. This change in reference to DLL would not make the Application1  working,as Applictaion1 sharedhello takes no argument.

The above situation is called DLL HELL.(The compatibility issues between the DLL.) 

#41:What is Delayed Signining ?

When generating Strongly Named Key,the Public Key and Private Key are generated to sign the Assembly.However,you can also create partial key,i.e you can have the public key generated and reserve the private key to be generated latter time.This is called Delayed or Partial Key.You can still deploy the partially signed assembly in GAC

#38:Generating Strong Name Key For Strong Named Assemblies.

To Create Strongly Named Assemblies,You must create Strong Name Key For that Assembly:

Steps to create Strong Name Key:

1.SN -k  yourkeyName.snk. The Key Contains both public and private key.(Keys are generated by Hashing Technique)

2.Attach the the Generated Strong Name to your application(From Visual Studio->Properties->Signing).

Generated below is the Publickey of SNK.you cannot view the Private key . 

SN

#37:Deploying Assemblies

Assembly can be deployed in two ways

1.Private Deployed Assembly.

2. Globally Deployed Assembly.

Private Deploy Assembly: Assembly that is deployed in the application directory or sub-directory (Under Lib/Reference folder).These are used only by Single application.

Globally Deployed Assembly:Deployed in Common Folder where the CLR Looks up for that assembly(For instance GAC Folder).These assemblies are shared by multiple application.

 

Weakly Named Assembly are examples of privately deployed assembly.

Strongly Named Assembly are examples of Globally Deployed assembly.Strongly Names Assembly can also be deployed Privately,But weakly Named Assembly cannot be Globally Deployed(They will not have public/private key token).

#35:MetaData

MetaData reside in Assembly and They are nothing more than list of tables which holds information about your managed modules(TypeDef,Parameterts,Module,AssemblyVersion,MethDef etc..).These tables are in turn use by CLR to execute the program. 

Listed Below,MetaData Info of Exe using ILDASM.

MetaData

#34:Assembly

An Assembly is a unit of deployment like EXE or DLL. There may  be one or more Assembly linked to Program,with one of them containing Manifest file.The Assembly with Manifest File is the Entry Point which contains information like Assembly Version.Description etc… 

Types of Assembly:

1.Strongly Named Assembly.

2.Weakly Named Assembly.

3.Satellite Assembly.

Manifest File of Assembly Below:

Manifest File