Check our online training feedbacks Here

01 December 2010


       Dot NET assemblies are unit of deployment which may or may not be executable, i.e., they might exist as the executable (.exe) file or dynamic link library (DLL) file. 

      Assembly consists manifest-which is a data structure which stores information about an assembly
The information includes version information, list of constituent files etc.
(constituent files can include any file types like image files, text files etc. along with DLLs or EXEs

One assembly can contain one or more files

There are two kind of assemblies in .NET;
  • private 
  • shared

Private assemblies 
          The assembly which is used only by a single application is called as private assembly. 
Suppose you created a DLL which encapsulates your business logic. This DLL will be used by your client application only and not by any other application. In order to run the application properly your DLL must reside in the same folder in which the client application is installed. Thus the assembly is private to your application.

Shared assemblies (also called strong named assemblies) 
        Suppose that you are creating a general purpose DLL which provides functionality which will be used by variety of applications. Now, instead of each client application having its own copy of DLL you can place the DLL in 'global assembly cache'. Such assemblies are called as shared assemblies.

       For all calling assemblies within the same application, the same copy of the shared assembly is used from its original location. Hence, shared assemblies are not copied in the private folders of each calling assembly. 
       Each shared assembly has a four part name including its face name, version, public key token and culture information. The public key token and version information makes it almost impossible for two different assemblies with the same name or for two similar assemblies with different version to mix with each other.

Global Assembly Cache - Global assembly cache is nothing but a special disk folder where all the shared assemblies will be kept. It is located under :\WinNT\Assembly folder.


What is CTS?
        In order that two language communicate smoothly CLR has CTS (Common Type
System).Example in VB you have “Integer” and in C++ you have “long” these datatypes are not
compatible so the interfacing between them is very complicated. In order that these two different
languages communicate Microsoft introduced Common Type System. So “Integer” data type in
VB6 and “int” data type in C++ will convert it to System.int32, which is data type of CTS. CLS,
which is covered in the coming question, is subset of CTS.

What is a CLS
      This is a subset of the CTS, which all .NET languages are expected to support.Microsoft has defined CLS, which are nothing but guidelines, that language should follow so that it can communicate with other .NET languages in a seamless manner.