Chapter 15. Assemblies

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:

  • The innovations offered by assemblies over previous technologies

  • How to create and view assemblies

  • What the Common Language Specification means, and how cross-language support is made possible

  • How to share assemblies

The chapter begins with an overview of assemblies.

What Are Assemblies?

Before the .NET platform was introduced, you had to deal with the predecessors of assemblies: normal DLLs exporting global functions and COM DLLs exporting COM classes. Microsoft itself introduced the phrase "DLL Hell" to describe traditional problems with DLLs—problems known all too well.

Often applications break because a newly installed application overwrites a DLL that has also been used by another application. Sometimes the installation replaces a new DLL with an old one, because the installation program does not correctly check the versions or the versions are not correctly set. More often, an old DLL is replaced by a new version. Normally, this shouldn't be a problem—the new DLL should be backward-compatible with the old version; however, often that is not the case.

Windows 2000 introduced the side-by-side feature, which allows the installation of DLLs in the application's directory. With side-by-side, you can install a different version ...

Get Professional C# 2005 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.