#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

#25:What is CLS ?

Common Language Specification: A Specification,which every language must definitely support and should be kept same across different languages.The intention is that you must be able to communicate between different languages.

Example: For Instance  class in VB,should be able to inherit from Class in C#.Here Inheritance is Common between two languages.Thus CLS is a way of defining minimal support across various languages.

#24 What is CTS ?

Common Type System:A set of standard that defines how data has to be mapped into memory.For instance data can be value type or memory type,data type can be int,float,long,decimal. Languages that Utilizes CLR,should expose the data types as defined by CTS.

Example:Let’s assume you want writing language called xyz.and you utilize CLR feature,and your data type has to map to either Value Type or Memory Type.You cannot define a new type called valuememory type and this will not be supported by CLR as it’s not defined in CTS.