|[ directory ]|
F.1 What is an assembly?
'Assembly' is a new term coined in .NET to represent a collection of software modules or components. An assembly is a file with a .dll or .exe file extension. A DLL assembly contains library classes and is not executable (much like a Java class without a main method), while an EXE assembly is executable (like a Java class with a main method).
You may have heard of the word 'module'. An assembly can consist of one or more modules. A module is an MSIL file that does not have an assembly manifest. Multiple modules can then be merged into a single assembly. A module file ends with the .netmodule extension.
You use your .NET compilers (such as your C# compiler) to generate assembly and module files from your .NET language source codes.
Despite the .exe extension, executable assemblies are not the same as ordinary Win32 EXE files. Assemblies contain IL code with associated metadata (the metadata describes the IL codes within). Each assembly has one special metadata file called the manifest, which describes the contents of the assembly as a whole.
If you try to run a .NET assembly under Win32 without the .NET framework installed, you will get a message box popping out informing you of a missing DLL file that is required for the execution of that assembly.
A .NET assembly contains a Win32 PE header ?this enables the Win32 environment to run the first part of it like a normal Win32 executable. What happens is that this header references an important method in a DLL file which is part of the .NET framework. This method then interprets the remaining parts of the assembly (which is IL code) and executes them. Win32 cannot understand IL code, but is at least able to run the PE header to invoke the correct method of the .NET framework.
The assembly's manifest contains the following information about the assembly:
|[ directory ]|