views:

89

answers:

1

I need to write code that reads the corflags of a .net assembly without loading it through reflection.

It takes relativly long time to load an assembly so I am looking for something that will open it as a stream and analize the binary stream.

Where do I find information about the assembly binary metadata struture? Is there any code snipet available?

Thanks Saar

A: 

According to Expert .NET 2.0 IL Assembler the corflags are defined in IMAGE_COR20_HEADER in CorHdr.h which you can find in the .NET Framework SDK. By including the right type defs you should be able to read through the assembly and pick out the information.

Brian Rasmussen