01 December 2010

Assembly


       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.


4 comments:

  1. where manifest is stored???
    manifest is data structure but if how can i identify dat it is manifest, is der any extension or what????????

    ReplyDelete
  2. difference between exe file & .DLL ????

    Tnx in advance

    ReplyDelete
  3. Both questions will be solved as new posts soon..
    be patient

    ReplyDelete
  4. What is difference between NameSpace and Assembly?

    ReplyDelete

Your comments, Feedbacks and Suggestions are very much valuable to me :)

Things are upgraded

My Dear readers, I am really thankful for being supportive all these years. This site was the first blog site I ever created in my life...