[英]Building 64-bit C# in Visual Studio 2010
I have a 64-bit solution that I recently reconfigured from 32-bit - both in Visual Studio 2010. I have set the Active Platform in Configuration Properties to x64 and the build complete without complaint. 我有一个我最近从32位重新配置的64位解决方案-在Visual Studio 2010中都是如此。我已将“配置属性”中的“活动平台”设置为x64,并且构建完成而没有任何抱怨。 However, when I run the executable and the dlls from the build through Dependency Walker, all dependencies are x64 except one which is for the binary it-self which is x86.
但是,当我通过Dependency Walker运行生成程序中的可执行文件和dll时,所有依赖项都是x64,唯一的依赖项是二进制本身x86。 So dependency walker complains but the binaries work.
因此,依赖项遍历者会抱怨,但是二进制文件可以工作。 Are the binaries supposed to have x86 dependencies to them-selves and are they then valid x64 applications?
二进制文件本身应该具有x86依赖性,然后它们才是有效的x64应用程序吗?
EDIT: I ran my executable through Corflags.exe as suggested by Hans Passant, which rendered the following output: 编辑:我按照Hans Passant的建议通过Corflags.exe运行了我的可执行文件,该文件提供了以下输出:
Version : v4.0.30319
CLR Header: 2.5
PE : PE32
CorFlags : 3
ILONLY : 1
32BIT : 1
Signed : 0
Does the 32BIT flag mean that it runs as a 32-bit process? 32BIT标志是否意味着它作为32位进程运行?
Dependency Walker has not been maintained in a very long time. Dependency Walker很长时间没有得到维护。 It doesn't know beans about managed assemblies, nor about the special trick that is used in the runtime support to turn an EXE that's marked as containing 32-bit code into a 64-bit process.
它不知道有关托管程序集的bean,也不知道运行时支持中用来将标记为包含32位代码的EXE转换为64位进程的EXE的特殊技巧 。
Specifically targeting x64 with the Platform target setting is entirely unnecessary, AnyCPU is the preferred choice since it will make your program work on either flavor of operating system. 完全不需要使用“平台”目标设置专门针对x64,AnyCPU是首选,因为它将使您的程序可以在两种操作系统上运行。 If you want to review settings afterwards, or change them, then use Corflags.exe
如果要在以后查看设置或进行更改,请使用Corflags.exe
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.