64位exe不在64位操作系统上运行 [英] 64-bit exe not running on 64-bit OS

查看:83
本文介绍了64位exe不在64位操作系统上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的应用程序创建了一个32位设置并安装在我的计算机中。现在我想用64位版本的可执行文件检查它。因此,如果我只用64位可执行文件替换Program Files(x86)中的32位可执行文件。我的申请会运行吗?目前我正在使用Visual Studio 2008开发应用程序。

I have created a 32-bit setup for my application and installed in my computer.Now I want to check it with 64-bit version executable. So if I replace only the 32-bit executable in Program Files (x86) with 64-bit executable files. Will my application run ? Currently I am developing application using Visual Studio 2008.

推荐答案

这是非常草率的,但是,它应该运行,但只有在你的64位目标是相同的作为您的系统和CPU 指令集架构。您可能会错过这样一个事实:在VS目标体系结构中,有两种不兼容的64位体系结构:x86-64(又名AMD64)和IE64(Itanium)。第一个更受欢迎。



所有平台都将兼容x86(32位),它将在64位系统上的WoW64下运行。 />


也许你真正的问题是:为什么你的产品不是全部用于任何CPU?这是最好的选择。 .NET程序集是JIT编译的,它允许您为所有平台制作一组程序集。



至于安装目标,唯一的区别是:32-位产品将安装在Program Files(x86)而不是Program Files上。如果你的程序集实际上是任何CPU甚至是64位目标,那么它不会产生任何问题,这只是...这是可恶的。我会说,与.NET相比,Windows Installer本身已经过时了。 Any CPU安装不存在是一个真正的蹩脚。 (如果有人知道我的信息已经过时,请写一个评论或其他解决方案来纠正我。)



如果你混合情况会有点复杂任何具有真实硬件目标架构之一的CPU以及非托管模块,但其效果很容易分析理解原理。







首先,您需要严格审查安装的必要性。考虑根本不使用安装。你修改系统注册表?更改防火墙设置?注册文件类型?如果没有,则不需要安装。在现代术语中,它被称为便携式选项。您可以正确地在任何位置运行软件(即使它不是任何CPU)。最后,微软开始鼓励这种风格,这种方式接近常识和更理性的思考。



-SA
This is very sloppy, but yes, it should run, but only in your 64-bit target is the same as your system and CPU instruction-set architecture. You probably miss the fact that, among VS target architectures, there are two incompatible 64-bit architectures: x86-64 (aka "AMD64") and IE64 ("Itanium"). The first one is more popular.

All platforms will be compatible with x86 (32-bit), which will be run under WoW64 on 64-bit systems.

Maybe your real problem is: why your product is not done all for "Any CPU"? This is the best option. .NET Assemblies are JIT-compiled, which allows you to make one set of assemblies for all platforms.

As to the installation target, the only difference is: 32-bit product will be installed on "Program Files (x86)" instead of "Program Files". It won't make any problems if you assemblies are actually "Any CPU" or even targeted 64-bit, only… this is abominate. I would say, Windows Installer itself is badly obsolete in comparison with .NET. It's a real lame that "Any CPU" installation does not exist. (Please, if someone knows that my information is outdated, please write a comment or another solution to correct me.)

Situation will be a bit more complicated if you mix Any CPU with one of the "real" hardware target architecture and also with unmanaged modules, but the effect of it is easy to analyze understanding the principles.



First of all, you need to critically review the need for the installation. Consider using no installation at all. Do you modify system registry? change firewall settings? register file types? If not, you don't need installation. In modern jargon, it's called "portable" option. You can right software (even if it is not "Any CPU") which runs in any location correctly. Finally, Microsoft started to encourage this style, this way coming close to common sense and more rational thinking.

—SA


需要使用不同的目标配置安装32位和64位。

如果安装向导设置为任何CPU,根据我的经验,它安装错误x64台电脑。因此需要2个安装项目,一个用于x86,另一个用于x64。
32 bit and 64 bit need to be installed with different target configurations.
If the install wizard is set as 'Any CPU', from my experience, it is incorrectly installed on x64 PCs. Thus need 2 setup projects, one for x86 and other for x64.


这篇关于64位exe不在64位操作系统上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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