CodeKicks.com
Focus on Microsoft Technologies - Tutorials, Articles, Code Samples.

Tuesday, June 24, 2008

.NET Assemblies Tutorial Part 5 of 5

.NET Assemblies Tutorial Part 1 of 5 - An Overview of .NET Assemblies
.NET Assemblies Tutorial Part 2 of 5 - Single-File and Multifile Assemblies
.NET Assemblies Tutorial Part 3 of 5 - The Role of the Common Intermediate Language
.NET Assemblies Tutorial Part 4 of 5 - The Role of .NET Type Metadata
.NET Assemblies Tutorial Part 5 of 5 - The Role of the Assembly Manifest

The Role of the Assembly Manifest

Last but not least, remember that a .NET assembly also contains metadata that describes the assembly itself (technically termed a manifest). Among other details, the manifest documents all external assemblies required by the current assembly to function correctly, the assembly's version number, copyright information, and so forth. Like type metadata, it is always the job of the compiler to generate the assembly's manifest. Here are some relevant details of the manifest generated when compiling the Calc.vb code file seen earlier in this chapter (assume we instructed the compiler to name our assembly Calc.exe):

.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89)
.ver 2:0:0:0
}
...
.assembly Calc
{
...
.ver 0:0:0:0
}
.module Calc.exe
.imagebase 0x00400000
.subsystem 0x00000003
.file alignment 512
.corflags 0x00000001


In a nutshell, this manifest documents the list of external assemblies required by Calc.exe (via the .assembly extern directives) as well as various characteristics of the assembly itself (version number, module name, etc.). Other parts of this tutorial sereis will examine the usefulness of manifest data in much more detail.



.NET Assemblies Tutorial Part 1 of 5 - An Overview of .NET Assemblies


.NET Assemblies Tutorial Part 2 of 5 - Single-File and Multifile Assemblies


.NET Assemblies Tutorial Part 3 of 5 - The Role of the Common Intermediate Language


.NET Assemblies Tutorial Part 4 of 5 - The Role of .NET Type Metadata


.NET Assemblies Tutorial Part 5 of 5 - The Role of the Assembly Manifest


Post a Comment