Chapter 18. Assemblies


  • An overview of assemblies

  • Creating assemblies

  • Using application domains

  • Sharing assemblies

  • Versioning

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.

This chapter teaches you how to create assemblies dynamically, how to load assemblies into appdomains, and how to share assemblies between different applications. The chapter also covers versioning, which is an important aspect of sharing 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? Although they both have the same file extension, .NET assemblies include metadata that describes 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 provides 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 ...

Get Professional C# 4 and .NET 4 now with O’Reilly online learning.

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