"为什么我的.NET EXE如此巨大"分析工具? [英] "Why is my .net exe so huge" analyzer tool?

查看:166
本文介绍了"为什么我的.NET EXE如此巨大"分析工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法,可以解释一个.NET程序集的大小(可执行文件或DLL)的工具?

Is there a tool that can explain the size of a .NET assembly (executable or dll)?

在古时,有一个IDE扩展,将细节由一个项目使用的空间。

In the olden days, there was an IDE extension that would detail the space used by a project.

它应该显示大的 code 的文件:

It should show the large code files:

和数据的资源的:

中是否有.NET世界中这样的事?

Is there such a thing for the .NET world?

我真的以为迁移到.NET,也不再有来构建整个VCL到可执行文件,该可执行文件大小会缩小。

i really thought that moving to .NET, and no longer having to build the entire VCL into the executable, that executable sizes would shrink.

  • <一个href="http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=analyze%20space%20used%20by%20.net%20assembly">Analyze使用.NET程序集的空间

推荐答案

标准的SDK了ILDASM(IL反汇编),有统计,在查看菜单选项,它打破下来是这样的。

The standard SDK took ILDASM (IL Disassembler), has "Statistics" option in the View menu, which breaks it down like this.

 File size            : 3072
 PE header size       : 512 (456 used)    (16.67%)
 PE additional info   : 167               ( 5.44%)
 Num.of PE sections   : 2
 CLR header size     : 72                 ( 2.34%)
 CLR meta-data size  : 1572               (51.17%)
 CLR additional info : 0                  ( 0.00%)
 CLR method headers  : 15                 ( 0.49%)
 Managed code         : 77                ( 2.51%)
 Data                 : 512               (16.67%)
 Unaccounted          : 145               ( 4.72%)

 Num.of PE sections   : 2
   .text    - 2048
   .reloc   - 512

 CLR meta-data size  : 1572
   Module        -    1 (10 bytes)
   TypeDef       -    4 (56 bytes)      0 interfaces, 0 explicit layout
   TypeRef       -   15 (90 bytes)
   MethodDef     -    4 (56 bytes)      0 abstract, 0 native, 4 bodies
   FieldDef      -    2 (12 bytes)      0 constant
   MemberRef     -   15 (90 bytes)
   ParamDef      -    4 (24 bytes)
   CustomAttribute-   13 (78 bytes)
   StandAloneSig -    1 (2 bytes)
   Assembly      -    1 (22 bytes)
   AssemblyRef   -    1 (20 bytes)
   Strings       -   571 bytes
   Blobs         -   336 bytes
   UserStrings   -     8 bytes
   Guids         -    16 bytes
   Uncategorized -   181 bytes

 CLR method headers : 15
   Num.of method bodies  - 4
   Num.of fat headers    - 1
   Num.of tiny headers   - 3

 Managed code : 77
   Ave method size - 19

这应该提供一个良好的起点。

This should provide a good starting point.

这篇关于&QUOT;为什么我的.NET EXE如此巨大&QUOT;分析工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆