Visual Studio 2008 有时会将平台重置回“任何 CPU”。来自“x86”
我有一个多项目解决方案,我使用配置管理器将所有项目的平台设置为“x86”。在所有项目中,调试和发布版本都以这种方式设置。
现在两次,平台已将自身重置回“任何 CPU”,我不得不再次进入配置管理器来修复它。
今天,在我从 Subversion 获得新的工作副本后发生了这种情况,但我不确定上次是否也发生过这种情况。
关于为什么会发生这种情况以及将来如何预防这种情况有什么建议吗?
I have a multi-project solution where I've set the Platform for all projects to "x86", using Configuration Manager. It's set this way for both Debug and Release builds, in all projects.
Twice now, Platform has reset itself back to "Any CPU", and I've had to go into Configuration Manager again to fix it.
Today, it happened after I got a new working copy from Subversion, but I'm not sure if that's what happened the last time.
Any suggestions on why this might be happening, and how to prevent it in future?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为所选版本是用户首选项,因此如果您签出干净的副本,您将从空白的用户首选项开始。文件。然后 VS 将默认为列表中的第一个,这可能是“任何 cpu”。
I think the selected build is a user preference, so if you check out a clean copy, you will start with a blank user pref. file. VS then would default to the first in the list, which is probably 'any cpu'.
我想出了一种方法,至少可以在问题发生时检测到它。
在预构建事件命令行中添加了以下内容:
如果平台设置发生更改,我现在在构建项目时会收到错误。
粗糙,但有效。
I came up with a way to at least detect the problem when it happens.
Added the following to the Pre-build Event Command Line:
If the Platform setting changes, I now get an error when I build the project.
Crude, but it works.