Assemblies

An assembly is a logical package (similar to a DLL in Win32) that consists of a manifest, a set of one or more modules, and an optional set of resources. This package forms the basic unit of deployment and versioning, and creates a boundary for type resolution and security permissioning.

Elements of an Assembly

Every .NET application consists of at least one assembly, which is in turn built from a number of basic elements.

The manifest contains a set of metadata that describes everything the runtime needs to know about the assembly. This information includes:

  • The textual name of the assembly

  • The version number of the assembly

  • An optional shared name and signed assembly hash

  • The list of files in the assembly with file hashes

  • The list of referenced assemblies, including versioning information and an optional public key

  • The list of types included in the assembly, with a mapping to the module containing the type

  • The set of minimum and optional security permissions requested by the assembly

  • The set of security permissions explicitly refused by the assembly

  • Culture, processor, and OS information

  • A set of custom attributes to capture details such as product name, owner information, etc.

Modules contain types described using metadata and implemented using MSIL.

Resources contain nonexecutable data that is logically included with the assembly. Examples of this include bitmaps, localizable text, persisted objects, etc.

Packaging

The simplest assembly contains a manifest and a single module ...

Get C# Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.