An assembly is the basic unit of deployment in .NET and is also the container for all types. An assembly contains compiled types with their IL code, runtime resources, and information to assist with versioning, security, and referencing other assemblies. An assembly also defines a boundary for type resolution and security permissioning. In general, an assembly comprises a single Windows Portable Executable (PE) file—with an .exe extension in the case of an application, or a .dll extension in the case of a reusable library. A WinRT library has a .winmd extension and is similar to a .dll, except that it contains only metadata and no IL code.
Most of the types in this chapter come from the following namespaces:
System.Reflection System.Resources System.Globalization
An assembly contains four kinds of things:
Provides information to the .NET runtime, such as the assembly’s name, version, requested permissions, and other assemblies that it references
Provides information to the operating system, such as how the assembly should be deployed and whether administrative elevation is required
The compiled IL code and metadata of the types defined within the assembly
Other data embedded within the assembly, such as images and localizable text
Of these, only the assembly manifest is mandatory, although an assembly nearly always contains compiled types (unless it’s a WinRT reference assembly). ...