在 Visual Studio 2010 Express 中更改目标 CPU 设置
我希望在 Visual Studio 2010 中将目标 CPU 设置从“任何 CPU”更改为“x86”。
我在另一个网站上看到我需要执行以下操作:
- 转到程序的启动项目。
- 打开属性窗口。
- 单击编译选项卡。
- 单击高级编译选项。
- 将目标 CPU 选项更改为 x86。
但我在属性中的任何地方都没有看到“编译”选项卡。
请尽早帮助我。
更新:我确实看到了一个平台下拉列表,但除了“任何 CPU”之外什么都不包含,
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:
- Go to the startup project of your program.
- Open the properties window.
- Click the compile tab.
- Click advanced compile options.
- 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",
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我相信您在项目属性中看不到“编译”选项卡的原因是因为您使用的是 Express 版本。此版本不正式支持针对特定 CPU 类型的优化。但是,您应该能够通过以下方式更改活动解决方案平台:
从“工具”菜单中,选择“选项”项,然后在左侧列表框中选择“项目和解决方案”选项的选项对话框。 (您可能必须先选中“显示所有设置”。)选中“显示高级构建配置”框:
然后,在“构建”菜单上,查看是否有名为“配置管理器”的项目。如果没有,您需要将该项目添加到菜单中(右键单击工具栏中的任意区域,然后选择列表底部的“自定义”)。
打开“配置管理器”对话框后,转到“活动解决方案平台”下拉框并选择“新建”。从出现的“新解决方案平台”对话框中,您应该能够从第一个下拉框中选择“x86”。
或者,您似乎可以手动编辑项目文件来指定 CPU 类型。请参阅更改目标 CPU VB Express 2008。看起来只需将第一个
部分下的
更改为“x86”。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 上,请转到菜单“工具”->“构建”。设置->检查专家设置。因此稍后您可以使用配置管理器。
To make the Build menu bar appear on your Visual Studio 2010, go to menu Tools -> Settings -> check Expert Settings. So later on you can use Configuration Manager.
我现在没有 Visual Studio 2010,但是在 Visual Studio 2008 中,您必须首先通过
Build -> 添加配置配置管理器。
添加配置后,您只需通过下拉菜单选择活动配置即可。
I don't have Visual Studio 2010 right now, but in Visual Studio 2008, you have to first add a configuration through
Build -> Configuration Manager
.After you have added the configuration, you can simply select the Active Configuration through the drop down menu.
我现在没有 Visual Studio 2010,但是在 Visual Studio 2008 中,您必须首先通过
Build -> 添加配置配置管理器。
添加配置后,您只需通过下拉菜单选择
活动配置
即可。I don't have Visual Studio 2010 right now, but in Visual Studio 2008, you have to first add a configuration through
Build -> Configuration Manager
.After you have added the configuration, you can simply select the
Active Configuration
through the drop down menu.