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.
Metadata of an assembly contains two parts:-
- 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.
- 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:-
- Single-File Assemblies: Single-File Assemblies contain all the necessary CIL, metadata and associated manifest in a single well defined package.
- 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.