用 Vista 64 编写的代码在 32 位操作系统上兼容吗? [英] Is code written in Vista 64 compatible on 32 bit os?

查看:24
本文介绍了用 Vista 64 编写的代码在 32 位操作系统上兼容吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在购买新的开发机器并升级到 Vista 64 Ultimate 以利用我们的 8gb 内存.我们的经理希望我们在 32 位虚拟机上进行所有开发,以确保我们的代码进入生产环境不会出现问题.

We are getting new dev machines and moving up to Vista 64 Ultimate to take advantage of our 8gb ram. Our manager wants us to do all dev in 32bit virtual machines to make sure there will be no problems with our code moving into production.

有什么方法可以保证生成的程序可以在 32 位操作系统上运行吗?我不介意使用虚拟机,但我不喜欢它们强迫您回到单一"监视器类型视图的方式.我喜欢将我的 VS 工具栏移到我的另一台显示器上.

Is there any way to guarantee the resultant programs will work on 32bit os's? I don't mind using virtual machines, but I don't like how they force you back into a "Single" monitor type view. I like moving my VS toolbars off to my other monitor.

我们使用的是 Visual Studio 2005 和 2008、VB.NET 和/或 C#

We are using Visual Studio 2005 and 2008, VB.NET and/or C#

使用 Harpreet 的 答案,这些是我用来设置我的 Visual Studio IDE 来编译 x86/32bit 的步骤:

Using Harpreet's answer, these are the steps I used to set my Visual Studio IDE to compile x86 / 32bit:

  1. 点击构建并打开配置管理器
  2. 选择活动解决方案平台下拉列表
  3. 选择 x86 如果它在列表中并跳到第 5 步,否则选择 >
  4. 在新建解决方案平台"对话框中,选择 x86 并按确定"
  5. 验证为您的所有项目选择的平台是 x86
  6. 点击关闭.

享受.

谢谢,基思

推荐答案

我在 32 位 Windows 的 64 位机器上进行开发.这不是问题.为了保守起见,您应该确保您的项目设置为在 x86 模式下编译.您需要查看解决方案中的每个项目并仔细检查.您也可以使用 AnyCPU 设置,但这有点风险,因为它在您的开发机器上的运行方式与 32 位机器上的运行方式不同.当然,您想避免 64 位模式.

I do development on 64 bit machines for 32 bit Windows. It's not a problem. You should make sure that your projects are set to compile in x86 mode in order to be conservative. You'll want to go through each project in the solution and double check this. You could also use the AnyCPU setting but that's a little riskier since it will run differently on your dev machine than a 32 bit machine. You want to avoid the 64bit mode, of course.

我遇到的问题是当应用程序编译为 64 位(明确为 64 位或 AnyCPU 编译并在 64 位 Windows 上运行)时驱动程序不起作用.坚持使用 x86 编译完全可以避免这些问题.这应该会揭示您的开发机器上的所有缺陷.

The problems I've run into are drivers that don't work when the app is compiled for 64 bit (explicitly 64 bit or AnyCPU compiled and running on 64 bit Windows). Those problems are completely avoidable by sticking with x86 compilation. That should reveal all flaws on your dev machines.

理想情况下,您可以设置一个可以在 32 位机器上频繁执行的构建和测试环境.这应该可以让您的管理层放心,并让您避免将虚拟机用作桌面.

Ideally, you could set up a build and test environment that could be executed against frequently on a 32 bit machine. That should reassure your management and let you avoid the VM as your desktop.

这篇关于用 Vista 64 编写的代码在 32 位操作系统上兼容吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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