I need a .NET assembly viewer which can show low-level details such as metadata tables content, etc.
-
1possible duplicate of [Dot net assembly viewer?](http://stackoverflow.com/questions/320272/dot-net-assembly-viewer) – KV Prajapati Feb 11 '11 at 08:21
-
@adatapost, possibly you need to read question carefully before writing? – user536232 Feb 11 '11 at 09:13
6 Answers
ildasm, the IL disassembler, has low-level managed metadata token information. It gets installed as part of the Windows SDK when you install Visual Studio. It should be accessible from a VS command prompt.
When you open a managed assembly, hit Ctrl+M or do View » MetaInfo » Show! to see the metadata tokens, e.g.:
TypeDef #1 (02000002) ------------------------------------------------------- TypDefName: ConsoleApplication1.Program (02000002) Flags : [NotPublic] [AutoLayout] [Class] [AnsiClass] [BeforeFieldInit] (00100000) Extends : 01000001 [TypeRef] System.Object Method #1 (06000001) [ENTRYPOINT] ------------------------------------------------------- MethodName: Main (06000001) ...
There are also options to view the raw metadata tables via ildasm /text /metadata=raw foo.dll
:
// ================================================= // 25(0x19): MethodImpl cRecs: 0(0), cbRec: 6(0x6), cbTable: 0(0) // col 0:* Class oCol: 0, cbCol:2, TypeDef // col 1: MethodBody oCol: 2, cbCol:2, MethodDefOrRef // col 2: MethodDeclaration oCol: 4, cbCol:2, MethodDefOrRef // ================================================= // 26(0x1a): ModuleRef cRecs: 0(0), cbRec: 2(0x2), cbTable: 0(0) // col 0: Name oCol: 0, cbCol:2, string // ================================================= // 27(0x1b): TypeSpec cRecs: 0(0), cbRec: 2(0x2), cbTable: 0(0) // col 0: Signature oCol: 0, cbCol:2, blob // ...

- 29,128
- 5
- 77
- 94
-
@user536232: see my updated answer. It looks like ildasm can dump the raw metadata tables in text format. I don't know how intelligible this is, but I know ildasm is kept up-to-date with the shipping compilers. – Chris Schmich Feb 11 '11 at 08:48
Did you try RedGate's reflector? http://www.red-gate.com/products/dotnet-development/reflector/

- 1,161
- 1
- 10
- 35

- 22,211
- 14
- 71
- 124
-
Nice tool, does what I need. Bit it's very old, doesn't support many new features. Is there any new version? – user536232 Feb 11 '11 at 08:35
Reflector will do that. It will show resources as well as metadata information on methods, etc.

- 12,074
- 14
- 61
- 97
There is an application CFF Explorer which will show you the metadata directories, PE header and all that other good stuff.
Available from: http://www.ntcore.com/exsuite.php

- 587
- 5
- 14
I think its already build-in in Visual Studio 2008 or use
NDepend
NDepend is a Visual Studio tool to manage complex .NET code and achieve high Code Quality. With NDepend, software quality can be measured using Code Metrics.

- 15,684
- 43
- 105
- 161
-
5what has NDepend got to do with assembly metadata tables? Pretty sure the answer is "nothing, nothing at all" – Marc Gravell Feb 11 '11 at 08:36