[英]Missing Debug|Any CPU build configuration for projects and defaulting to Debug|x86 on Windows x64
I've just recently reinstalled Windows 7 x64 on my box. 我刚刚在我的盒子上重新安装了Windows 7 x64。 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.
我相信Windows或.NET x64存在配置问题。
Symptoms 症状
Am I correct in thinking that Debug|Any CPU is normally the default configuration. 我认为Debug | Any CPU通常是默认配置是正确的。 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 . 在Visual Studio 2010中,新项目的默认值已更改为x86 - 您可以在Rick Byers的博客文章中阅读MS的一些推理。 任何CPU Exes通常都比它们的价值更麻烦 。
You should be able to add Any CPU as an additional platform in the Configuration Manager dialog though. 您应该能够在Configuration Manager对话框中添加任何CPU作为附加平台。 I have Windows Vista x64 & Visual Studio 2010 and get options for Any CPU, x64 and Itanium.
我有Windows Vista x64和Visual Studio 2010,并获得Any CPU,x64和Itanium的选项。 You could try re-running the installer for Visual Studio and see if there were any options you didn't install.
您可以尝试重新运行Visual Studio的安装程序,看看是否有任何未安装的选项。
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. 有趣的是,似乎x86只是新EXE项目的默认设置 - 如果您创建一个新的类库项目,它将默认为任何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.
这是有道理的,因为它是EXE文件的平台,它决定了运行哪个版本的CLR,而x86和x64 EXE文件都可以加载任何CPU DLL。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.