开发者

.NET Assembly viewer wanted

I need a .NET assembly viewer which can show low-level details such as met开发者_运维技巧adata tables content, etc.


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  
// ...


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


Check out

http://www.codeproject.com/KB/dotnet/asmex.aspx


Reflector will do that. It will show resources as well as metadata information on methods, etc.


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


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.

NDepend

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜