使用CorFlags.exe来观察dll的header信息:
1. 打开 Visual Studio command prompt.
2. 输入 “CorFlags.exe [Assembly File Path]“.
3. 显示下面的信息:
Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
Version : v2.0.50727
CLR Header: 2.5
PE : PE32
CorFlags : 1
ILONLY : 1
32BIT : 0
Signed : 0
4. 查看下面的表,来决定是否为32,64还是anycpu:
anycpu: PE = PE32 and 32BIT = 0
x86: PE = PE32 and 32BIT = 1
64-bit: PE = PE32+ and 32BIT = 0