h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

Assembly in Net

Define Assembly 
An assembly is a fundamental unit of any .NET application. It contains the code that is executed by CLR (common language runtime).
I would like to limit the details to what is required to create and use an assembly.
However, it is important to know a few details about assemblies before we delve into creating and using it.
An assembly contains name, version, types (classes and others) created in it and details about other assemblies it references.
An assembly may be either an executable file - .EXE or a dynamic link library - .DLL


Type of Assembly:

  1. Private Assembly
  2. Shared Assembly

Private Assembly:
By default every assembly is a private assembly.
If we add a reference to a private assembly to any project, a copy of the assembly is given to the project.
So each project maintains a private copy of the assembly.

Shared Assembly:
A shared assembly is an assembly that resides in a centralized location known as the GAC (Global Assembly Cache) and that provides resources to multiple applications.
If an assembly is shared then multiple copies will not be created even when used by multiple applications.