Visual Studio 2008 有时会将平台重置回“任何 CPU”。来自“x86”

发布于 2024-10-16 02:20:52 字数 219 浏览 14 评论 0原文

我有一个多项目解决方案,我使用配置管理器将所有项目的平台设置为“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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

莳間冲淡了誓言ζ 2024-10-23 02:20:52

我认为所选版本是用户首选项,因此如果您签出干净的副本,您将从空白的用户首选项开始。文件。然后 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'.

噩梦成真你也成魔 2024-10-23 02:20:52

我想出了一种方法,至少可以在问题发生时检测到它。

在预构建事件命令行中添加了以下内容:

rem EXIT WITH ERROR 99 IF PLATFORM IS NOT x86. (CHECK CONFIGURATION MANAGER)
if $(PlatformName) NEQ x86 exit 99

如果平台设置发生更改,我现在在构建项目时会收到​​错误。

粗糙,但有效。

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:

rem EXIT WITH ERROR 99 IF PLATFORM IS NOT x86. (CHECK CONFIGURATION MANAGER)
if $(PlatformName) NEQ x86 exit 99

If the Platform setting changes, I now get an error when I build the project.

Crude, but it works.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文