Introduction to Assemblies

The assembly is the core unit of logical deployment within the .NET Framework. Whenever you compile your code, it must eventually end up in an assembly. When your application is executed after deployment, its assemblies are loaded by the Common Language Runtime. As you will see in the next section, there is a lot more to the assembly than meets the eye. A lot of developers take it for granted that an assembly is just another word for "DLL," but that couldn't be further from the truth.

An assembly is a logical container that stores not only compiled code, but also metadata and resources. Assemblies serve the following purposes:

  • Assemblies are containers for compiled code that will be executed by the CLR.

  • Assemblies are a logical unit of security. When code permissions are granted or denied, they are often done so at the assembly level.

  • Assemblies serve as a logical unit of version control. Every type and resource contained within a given assembly shares the same version number (and other identifying information, such as public key and culture).

  • As mentioned, assemblies are a logical unit of deployment. When you deploy your application, it is deployed at the assembly level.

Some of this might not make much sense at the moment, but it will become much clearer in the next section, where we take a look at the internals of assemblies in the .NET Framework.

Microsoft Visual C# 2005 Unleashed
Microsoft Visual C# 2005 Unleashed
ISBN: 0672327767
EAN: 2147483647
Year: 2004
Pages: 298 © 2008-2017.
If you may any questions please contact us: