缺少调试|项目的任何 CPU 构建配置,并在 Windows x64 上默认为调试|x86

发布于 2024-09-11 02:21:40 字数 377 浏览 2 评论 0原文

我最近刚刚在我的机器上重新安装了 Windows 7 x64。安装成功,整个操作系统没有出现任何问题。我认为 Windows 或 .NET x64 存在配置问题。

症状

  1. 新项目的默认构建配置是 Debug|x86。
    这感觉不对。我运行的是 x64 操作系统,并且我有理由相信,在此之前的最后三个版本中,默认构建配置是调试|任何 CPU
  2. 任何 CPU 根本不作为项目的构建配置存在,但我有理由确信它应该存在。要构建任何 x64,我需要为项目显式添加 x64 平台。

我是否正确地认为调试|任何CPU通常是默认配置。如果是这样,有哪些可能的原因会导致创建的任何新项目都没有出现这种情况?

I've just recently reinstalled Windows 7 x64 on my box. The installation succeeded, and I've had no issues with the operating system as a whole. I believe there is a configuration issue with either Windows or .NET x64.

Symptoms

  1. The default build configurations for new projects is Debug|x86.
    This doesn't feel right. I'm running an x64 OS, and I'm reasonably confident that for the last three versions prior to this the default build config has been Debug|Any CPU.
  2. Any CPU does not exist as a build configuration for projects at all, and I'm reasonably sure it should. To build anything x64 I need to explicitly add an x64 platform for the project.

Am I correct in thinking that Debug|Any CPU is normally the default configuration. If so, what are some possible causes for this not being the case for any new projects created?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

傾旎 2024-09-18 02:21:44

Visual Studio 2010 中新项目的默认值已更改为 x86 - 您可以在 Rick Byers 的博客文章中阅读 MS 对此的一些推理任何 CPU Exes 通常带来的麻烦都超过其价值< /em>.

不过,您应该能够在“配置管理器”对话框中添加任何 CPU 作为附加平台。我有 Windows Vista x64 和Visual Studio 2010 并获得适用于任何 CPU、x64 和 Itanium 的选项。您可以尝试重新运行 Visual Studio 安装程序,看看是否有任何未安装的选项。

有趣的是,似乎 x86 只是新 EXE 项目的默认值 - 如果您创建一个新的类库项目,它将默认为任何 CPU。这是有道理的,因为 EXE 文件的平台决定了要运行的 CLR 版本,而任何 CPU DLL 都可以由 x86 和 x64 EXE 文件加载。

The default for new projects was changed to x86 in Visual Studio 2010 - you can read some of MS' reasoning for this in Rick Byers' blog post Any CPU Exes are usually more trouble than they're worth.

You should be able to add Any CPU as an additional platform in the Configuration Manager dialog though. I have Windows Vista x64 & Visual Studio 2010 and get options for Any CPU, x64 and Itanium. You could try re-running the installer for Visual Studio and see if there were any options you didn't install.

Interestingly, it seems x86 is only the default for new EXE projects - if you create a new Class Library project it will default to Any CPU. This makes sense as it is the platform of the EXE file that determines which version of the CLR to run, whereas an Any CPU DLL can be loaded by both x86 and x64 EXE files.

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