Join Ted Neward for an in-depth discussion in this video Physical assemblies, part of CLR Assemblies Deployment for .NET Developers.
- [Instructor] A conceptual discussion of assemblies is all well and good, but at a certain point, rubber has to meet road. What is an assembly, in physical terms? Well, fundamentally, an assembly starts out as a COFF or Portable Executable file. Now, COFF, Common Object File Format, is actually an old UNIX standard that is still in use on a number of UNIX platforms today. Microsoft, when they developed Windows NT, they used the COFF format for their Portable Executable file format with a few tweaks. And similarly here, for backwards compatibility reasons, Microsoft chose to use the Portable Executable file format to be the physical format for an assembly.
Now, the nice thing about his particular file format is it allows us a certain degree of flexibility, and in particular Microsoft was able to use that format to put in all of the things that an assembly requires, which is to say, first of all, there needs to be a, what we call an assembly manifest. Manifest file, similar to what its name implies, is a description of everything that's inside the assembly, but it's also a description of the assembly. We'll be looking at the manifest file in pretty deep detail as we go on.
The set of metadata tables is important because it will allow us to store and retrieve and allow tools and utilities to be able to reference these things in a relatively standardized format. The assembly can also store a set of non-code resources. We don't do this as much with respect to web projects, but remember that .NET is designed to address a wide variety of different environments, so for example, games and/or desktop applications will often find it convenient to store things like images, audio files, configuration files, et cetera, and all of that can be bundled directly inside of the assembly.
Now the assembly can also be strongly named. We'll be talking about this in a little bit. What that means is that we use cryptographic concepts to generate a hash that is stored within the assembly to insure that it hasn't been tampered with, and this will be something that .NET will specifically key off of, when it loads this assembly.
- Reviewing the concept of assemblies
- Reviewing library assemblies in ildasm
- Working with assemblies and modules
- Working with assembly scope types
- Reviewing assembly names and versions
- Referencing assemblies from managed code