Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET Assembly viewer wanted

Tags:

.net

I need a .NET assembly viewer which can show low-level details such as metadata tables content, etc.

like image 602
user536232 Avatar asked Dec 17 '22 17:12

user536232


2 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  
// ...
like image 81
Chris Schmich Avatar answered Dec 19 '22 06:12

Chris Schmich


Did you try RedGate's reflector? http://www.red-gate.com/products/dotnet-development/reflector/

like image 45
vamyip Avatar answered Dec 19 '22 08:12

vamyip