In .NET, the basic unit deployable is called an assembly. Assemblies play an important part of the development process where understanding how they work is useful in helping you develop scalable, efficient .NET applications. This chapter explores:
The components that make up a .NET assembly
The difference between single-file and multi-file assemblies
The relationships between namespaces and assemblies
The role played by the Global Assembly Cache (GAC)
How to develop a shared assembly, which can be shared by other applications
In .NET, an assembly takes the physical form of an EXE (known as a process assembly) or DLL (known as a library assembly) file, organized in the Portable Executable (PE) format. The PE format is a file format used by the Windows operating system for storing executables, object code, and DLLs. An assembly contains code in IL (Intermediate Language; compiled from a .NET language), which is then compiled into machine language at runtime by the Common Language Runtime (CLR) just-in-time compiler.
An assembly consists of the following four parts (see Figure 15-1).
Describes the assembly and its content
Defines all the types and methods exported from the assembly
Contains the MSIL code compiled by the compiler
Contains icons, images, text strings, as well as other resources used by your application
Figure 15.1. Figure 15-1
Physically, all four parts ...