Chapter 17


An assembly is the .NET term for a deployment and configuration unit. This chapter discusses exactly what assemblies are, how they can be applied, and why they are such a useful feature. In particular, this chapter covers the following topics:

  • Overview
  • Creating assemblies
  • Application domains
  • Shared assemblies
  • Versioning

The chapter begins with an overview of assemblies.

What Are Assemblies?

Assemblies are the deployment units of .NET applications. .NET applications consist of one or more assemblies. .NET executables with the usual extension EXE or DLL are known by the term assembly. What’s the difference between an assembly and a native DLL or EXE? Though they both have the same file extension, .NET assemblies include metadata that describe all the types that are defined in the assembly with information about its members — methods, properties, events, and fields.

The metadata of .NET assemblies also give information about the files that belong to the assembly, version information, and the exact information about assemblies that are used. .NET assemblies are the answer to the DLL hell we’ve seen previously with native DLLs.

Assemblies are self-describing installation units, consisting of one or more files. One assembly could be a single DLL or EXE that includes metadata, or it can be made of different files, for example, resource files, modules, and an EXE.

Assemblies can be private or shared. With simple .NET applications, using just private assemblies is ...

Get Professional C# 2008 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.