Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




Assembly in asp.net

It is the main unit of a .NET application. Assembly physically exist as DLLs or EXEs. It contains metadata, IL code, resources, and type metadata. It can be a whole program or a component that can be used by one or more programs. The constituent files can include any file types like image files, text files etc. along with DLLs or EXEs. When you compile your source code by default the exe/dll generated is actually an assembly.

Every assembly file contains information about itself. This information is called as Assembly Manifest.

Assembly manifest is a data structure which stores information about an assembly. This information is stored within the assembly file(DLL/EXE) itself. The information includes version information, list of constituent files etc.

The assembly used for one application is not applied to another application. However one assembly can be shared with other applications. In this case the assembly has to be placed in the bin directory of the application that uses it.

Thus you can create two types of Assemblies in ASP.NET:

Private assemblies
Shared assemblies

Private ASP.NET Assemblies are created whey you build component files like DLLs that can be applied to one application.

Shared ASP.NET Assemblies are created when you want to share the component files across multiple applications. Shared ASP.NET Assemblies must have a unique name and must be placed in Global Assembly Cache (GAC). The GAC is located in the Assembly directory in WinNT. You can view both the manifest and the IL using ILDisassembler (ildasm.exe).

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

Share this article   |    Print    |    Article read by 1933 times
Author:
Rohit kakria
I am software developer, moderator of xpode.com
Related Articles:
Related Interview Questions: