O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12. 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 three basic elements: a manifest, modules, and resources.

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

  • The simple name of the assembly

  • The version number of the assembly

  • An optional originator public key and 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 are Portable Executable (PE) files that contain types described using metadata and implemented using MSIL. Additionally, modules have module manifests that define the external assemblies they are dependent on.

Resources contain nonexecutable data ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required