Assemblies in .NET

It is very important to understand .NET assemblies(files) first in order to understand .NET architecture. Whatever .NET language you select to program with, .NET-aware compiler will created a file which will contain intermediate language (IL also known as CIL) and type metadata as shown in following figure. This file is called assembly.




Understanding Metadata

Metadata of an assembly contains two parts:-

  1. Type Metadata: It describes each and every type (class, structure,enumeration etc.) defined in the C# program along with the members of each type (methods, properties, events etc.). Example: If you write a c# program then type metadata describes it's base class, interfaces used by it, all the methods along with its return type, arguments and parameters etc.
  2. Manifest: It describes all the external assemblies required by the current assembly to work properly, assembly's current version number and copyright information, module name etc.

Understanding Types of Assemblies

Assemblies can be of two types:-

  1. Single-File Assemblies: Single-File Assemblies contain all the necessary CIL, metadata and associated manifest in a single well defined package.
  2. Multifile Assemblies: Multifile Assemblies contain numerous modules. Each module contains module level CIL, metadata and manifest. One of these modules also known as primary module stores the information about the set of other required modules.
Banner to

Hide Page Information

Assemblies in C#, Learn basic concepts and Types of assemblies in .NET Framework