Assembly is a basic element ofpackaging in .NET. An assembly consists of IL code, metadata that describeswhat is in the assembly, and any other files or information that theapplication needs to run, such as graphics and sound files.

An assemblyperforms the following functions:

Ø It contains code that the CLR executes. Assemblycontains IL code plus the manifest in a portable executable (PE) file will beexecuted by CLR. Note that each assembly can have only one entry point (i.e.,DllMain, WinMain, or Main).

Ø An assembly is the unit at which permissions arerequested and granted. Hence it forms a security boundary.

Ø It forms a type boundary. Every assembly has aunique name and the type’s within those assemblies includes the name of thatassembly. Hence every type has unique name or unique boundary. The assembly’smanifest contains assembly metadata that is used by CLR for resolving types andsatisfying resource requests.

Ø It forms a version boundary. The assembly is thesmallest version able unit in the CLR. All types and resources in the sameassembly are versioned as a unit. The assembly’s manifest describes theversion.

Ø It forms a deployment unit. When an applicationstarts, only the assemblies that the application initially calls must bepresent. Other assemblies, such as localization resources or assemblies containingutility classes can be retrieved whenever they are called. This allowsapplications to be kept simple and thin at first.


Assembliescan be static or dynamic. Static assemblies can include .NETtypes (interfaces and classes), as well as required resources for the assembly(bitmaps, JPEG files, resource files, and so on). Static assemblies are storedon disk in PE files. Dynamic assembliesare one which run directly from memory and are not saved to disk beforeexecution. They can be saved disk after they have executed.

Leave Comment