在 Visual Studio 2010 Express 中更改目标 CPU 设置 [英] Change target CPU settings in Visual Studio 2010 Express

查看:28
本文介绍了在 Visual Studio 2010 Express 中更改目标 CPU 设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在 Visual Studio 2010 中将目标 CPU 设置从任何 CPU"更改为x86".

我在另一个网站上看到我需要执行以下操作:

  1. 转到您程序的启动项目.
  2. 打开属性窗口.
  3. 单击编译选项卡.
  4. 点击高级编译选项.
  5. 将目标 CPU 选项更改为 x86.

但我在属性中的任何地方都没有看到编译"选项卡.

请尽早帮助我.

更新:我确实看到了一个平台下拉菜单,但除了任何 CPU"之外什么都不包含

解决方案

我相信您在项目属性中看不到编译"选项卡的原因是您使用的是 Express 版本.此版本不正式支持针对特定 CPU 类型的优化.但是,您应该能够通过以下方式更改活动解决方案平台:

从工具"菜单中,选择选项"项,然后在选项"对话框左侧的列表框中选择项目和解决方案"选项.(您可能需要先选中显示所有设置".)选中显示高级构建配置"框:

然后,在构建"菜单上,查看您是否有一个名为配置管理器"的项目.如果没有,您需要将该项目添加到菜单中(右键单击工具栏中的任何区域,然后选择列表底部的自定义").

打开配置管理器对话框后,转到活动解决方案平台"下拉框并选择新建".在出现的New Solution Platform"对话框中,您应该可以从第一个下拉框中选择x86".

或者,您似乎可以手动编辑项目文件以指定 CPU 类型.请参阅更改目标 CPUVB Express 2008.看起来它相当于简单地将第一个 部分下的 更改为x86".

I wish to change the target CPU settings from "Any CPU" to "x86" in Visual Studio 2010.

I read on another website that I need to do the following:

  1. Go to the startup project of your program.
  2. Open the properties window.
  3. Click the compile tab.
  4. Click advanced compile options.
  5. Change the target CPU options to x86.

But I don't see the "compile" tab anywhere in the properties.

Please help me at the earliest.

Update: I do see a platform dropdown, but that contains nothing apart from "Any CPU",

.

解决方案

I believe the reason you don't see the Compile tab in the project properties is because you're using the Express edition. Optimization for a specific CPU type is not offically supported in this edition. However, you should be able to change the active solution platform in the following way:

From the "Tools" menu, select the "Options" item, and then select the "Projects and Solutions" option in the listbox on the left-hand side of the Options dialog. (You might have to check "Show all settings" first.) Check the box that says "Show advanced build configurations":

Then, on the "Build" menu, see if you have an item called "Configuration Manager". If not, you need to add the item to the menu (right-click on any area in the toolbar and choose "Customize" at the bottom of the list).

Once you've opened the Configuration Manager dialog, go to the "Active solution platform" drop-down box and choose "New". From the "New Solution Platform" dialog that appears, you should be able to choose "x86" from the first drop-down box.

Alternatively, it looks like you can manually edit the project file to specify the CPU type. See Changing the target CPU in VB Express 2008. It looks like it amounts to simply changing the <PlatformTarget> under the first <PropertyGroup> section to "x86".

这篇关于在 Visual Studio 2010 Express 中更改目标 CPU 设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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