What is Assembly in .NET Framework.
- An Assembly is a logical unit of code.
- Assembly physically exist as DLLs or EXEs.
- One assembly can contain one or more files.
- 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.
- When you talk about version of a component you are actually talking about version of the assembly to which the component belongs.
- Every assembly file contains information about itself. This information is called as Assembly Manifest.
Manifest : Assembly manifest is a data structure which stores information about an assembly
Assembly Metadata is stored in the Manifest.
Metadata: is a data about data.
Metadata is a code that describes the compiled MSIL. .NET language compiler will generate the metadata and store this in the assembly containing the MSIL.
Every Assembly you create contains one or more program files and a Manifest. There are two types program files : Process Assemblies (EXE) and Library Assemblies (DLL). Each Assembly can have only one entry point (that is, DllMain, WinMain, or Main). We can create two types of Assembly, private Assembly and shared Assembly . A private Assembly is used only by a single application, and usually it is stored in that application’s install directory. A shared Assembly is one that can be referenced by more than one application. If multiple applications need to access an Assembly, we should add the Assembly to the Global Assembly Cache (GAC).