我该如何解释CorFlags标志以及如何使用它来确定 .NET 程序集是为 x86 还是 x64 构建的?
会不会是下面这个?
corflags MyAssembly.dll
微软.NET 4.5引入了一个新选项,任何 CPU 32 位首选。在新版本的CorFlags.exe中,32BIT标志不再存在,而是添加了两个新标志,32BITREQ and 32位参考.
根据下面的解释,我们可以将新的 CorFlags 解释如下。
CPU Architecture PE 32BITREQ 32BITPREF
------------------------ ----- -------- ---------
x86 (32-bit) PE32 1 0
x64 (64-bit) PE32+ 0 0
Any CPU PE32 0 0
Any CPU 32-Bit Preferred PE32 0 1
显示的标志CorFlags.exe位于C:\程序文件
(x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 工具
Version : Assembly's target framework.
Header : 2.0/2.5 (Must have version of 2.5 or greater to run natively)
PE : PE32 (32-bit)/PE32+ (64-bit)
CorFlags : Hexadecimal value, computed based on below 4 flags.
ILONLY : 1 if MSIL otherwise 0
32BITREQ : 1 if 32-bit x86 only assembly otherwise 0
32BITPREF : 1 if 32-bit x86 only preferred in Any CPU architecture otherwise 0
Signed : 1 if signed with strong name otherwise 0
以下示例说明了输出C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\CorFlags.exe
对于不同的组件。
来自PresentationCore.dllGAC_32
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)