manifest for non-assembly file in a Multi-file Assembly scenario...

D

Dan

Hi all

according to a lot articles that I read about .NET assemblies, I understand
that an assembly file always contains a manifest but it is not required for
a non-assembly module or it should not contain a manifest. In a multi-file
assembly scenario, I created a module using the C# compiler as follow:

csc /out:MyModule.mod /t:module MyModule.cs

then I created an assembly that includes this module by doing this:

csc /out:MyAsm.dll /t:library /addmodule:MyModule.mod MyAsm.cs

After I use ILDASM to view their metadata information, nothing unusual for
the assembly file: MyAsm.dll, it comes with the usual manifest and types
metadata and ILs. But when I open MyModule.mod using ILDASM, there is also a
manifest associated with the non-assembly module. Is there a change of
specification? or do I miss anything small print somewhere?

thanks in advance
dan
 
M

Mattias Sjögren

Is there a change of
specification? or do I miss anything small print somewhere?

A module doesn't contain an *assembly* manifest, which is what you see
represented as

..assembly { ... }

in IL assembler. ILDASM will still show the MANIFEST node with other
module related stuff.



Mattias
 
D

Dan

Hi Mattias

thanks for replying. when I double-click on the MANIFEST node of the module
it still shows a manifest-like information as shown below:

..assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) //
..z\V.4..
.hash = (E6 8E F4 00 2B 3C 3C 88 D6 32 F2 72 A3 22 FA C8 //
.....+<<..2.r."..
A7 7B 24 07 ) // .{$.
.ver 1:0:5000:0
}
..module RUT.mod
// MVID: {C7454178-3357-4EA8-8BFA-2DE5C77B1CA1}
..imagebase 0x00400000
..subsystem 0x00000003
..file alignment 512
..corflags 0x00000001
// Image base: 0x06ca0000

it looks like a standard manifest info that I saw when opening an assembly
file with manifest. this is really puzzling me...any comments?

thanks
dan
 
M

Mattias Sjögren

Dan,
it looks like a standard manifest info that I saw when opening an assembly
file with manifest. this is really puzzling me...any comments?

Compare it carefully to an assembly and you'll see that the
".assembly" block is missing.

Don't confuse it with ".assembly extern", which is an assemblyref
(reference to other assembly that you're using in your code).



Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top