Assemblies

The assembly is used by the CLR as the smallest unit for the following:

  • Deployment
  • Version control
  • Security
  • Type grouping
  • Code reuse

An assembly must contain a manifest, which tells the CLR what else is in the assembly. The other elements fall into the following three categories:

1. Type metadata
2. Microsoft Intermediate Language (MSIL) code
3. Resources

An assembly can be just one file. Figure 17.1 details the contents of a single-file assembly. Alternatively, the structure can be split across multiple files.

Figure 17.1 Logical structure of an assembly

17.1

An assembly can have only one manifest section across all the files that make up the assembly. There is nothing stopping you, however, from having a resource section (or any of the other available section types, such as Metadata and MSIL code) in separate files that make up an assembly.

Get Professional Visual Basic 2012 and .NET 4.5 Programming 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.