无法将目标平台更改为“任何 CPU" [英] Can't change target platform to "any CPU"

查看:38
本文介绍了无法将目标平台更改为“任何 CPU"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 x86 pc 上工作并在 VS2010 中使用 .NET4.0(与 3.5 相同的问题).当我创建一个新项目(例如 WinFormsApp)时,我想做的第一件事就是将项目/解决方案的目标平台更改为Any CPU".

I work on an x86 pc and use .NET4.0 (same probelem with 3.5) in VS2010. When I make a new Project (e.g. WinFormsApp), the first thing I want to do is to change the target platform of the project/solution to "Any CPU".

我执行以下操作:

项目属性 -> 构建 -> 将 TargetPlatform 更改为任何 CPU"

Project Properties -> build -> change TargetPlatform to "Any CPU"

在属性页面的顶部,平台仍然是活动的(x86)",所以我这样做

On top of the properties page the platform is still "Active (x86)", so I do

Solution Properties -> ConfigurationsMgr -> Platform -> new(因为只有 x86 可用)并创建解决方案平台Any CPU".

Solution Properties -> ConfigurationsMgr -> Platform -> new (since nothing but x86 is available) and create the solution platform "Any CPU".

现在项目属性是Active (Any CPU)",我可以随意更改它.

Now the project properties are "Active (Any CPU)" and I can change it back and forth as I like.

现在的问题是:当我添加一个新项目时,它再次设置为活动 (x86)",而且我 - 再次 - 无法更改项目设置.在第二个项目的 SolutionProperties -> ConfigurationManager 中,Any CPU"平台不可用,我无法添加新平台,因为它告诉我 AnyCPU 的解决方案平台已经存在...

And now the Problem: When I add a new Project, it is again set to "Active (x86)" and I -again - can't change the project settings. In the SolutionProperties -> ConfigurationManager for this second project, the "Any CPU" platform is not available and I can't add a new one, since it tells me that a solution platform for AnyCPU is already there...

我做错了什么?新创建的项目设置为AnyCPU有那么难吗?

What am I doing wrong? Can it be so hard to set a newly created project to AnyCPU?

推荐答案

在配置管理器中,您可以为您的项目添加一个新平台.但是,如果您已经为您的解决方案添加了平台,您需要取消选中创建新的解决方案平台",否则您确实会收到解决方案平台已经存在的警告.

In the configuration Manager, you can add a new platform for your project. However, you need to uncheck the "Create new solution platforms" if you already added the platform for your solution, otherwise you will indeed get the warning that the solution platform is already there.

这篇关于无法将目标平台更改为“任何 CPU"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆