Blog

What is an Assembly? Explain its parts?

Posted By : ExcelPTP

February 6, 2014

An assembly exists as a .DLL or .EXE that contains MSIL code that is executed by CLR.

An assembly contains interface and classes, it can also contain other resources like bitmaps, files etc. It carries version details which are used by the CLR during execution. Two assemblies of the same name but with different versions can run side-by-side enabling applications that depend on a specific version to use assembly of that version. An assembly is the unit on which permissions are granted. It can be private or global. A private assembly is used only by the application to which it belongs, but the global assembly can be used by any application in the system.

The four parts of an assembly are:

Assembly Manifest – It contains name, version, culture, and information about referenced assemblies.Type metadata – It contains information about types defined in the assembly.MSIL – MSIL code.Resources – Files such as BMP or JPG file or any other files required by application.