开发者

Missing Debug|Any CPU build configuration for projects and defaulting to Debug|x86 on Windows x64

开发者 https://www.devze.com 2023-01-08 03:49 出处:网络
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

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 e开发者_开发百科xist 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消