简体   繁体   English

在Visual Studio 2010中生成64位C#

[英]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.

相关问题 在64位Visual Studio 2010中生成时,C#应用程序不能正常工作 - C# application when build in Visual Studio 2010 64-bit does not work well 如何使用visual studio 2010启动64位编程? - How to start 64-bit programming with visual studio 2010? 使用Visual Studio 2010时,32位和64位操作系统之间的性能差异? - Performance difference between 32-bit and 64-bit OS when i use Visual Studio 2010? 我已经使用Visual Studio Express C#为2010 Office(64位)编写了Excel代码,如何在2010 Office(32位)上运行它? - I have written excel code for 2010 Office (64 bit) with visual studio express c#, how to run it on 2010 office (32 bit)? int是64位C#中的64位整数吗? - Is an int a 64-bit integer in 64-bit C#? Visual Studio 2010 Express可以自动注册64位DLL吗? - Can Visual Studio 2010 Express automatically register 64-bit DLLs? 是否可以为 Visual Studio 2010 编写一个 Debugger Visualizer 来显示 64 位 .NET 程序? - Is it possible to write a Debugger Visualizer for Visual Studio 2010 to display 64-bit .NET programs? Quantlib 64位适用于C#吗? - Quantlib 64-bit for C#? Visual Studio 2010/2012:32位还是64位? - Visual Studio 2010/2012: 32 or 64 bit? 使用Visual Studio 2010从命令行构建C#解决方案 - Building C# solutions from command line with Visual Studio 2010
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM