开发者

Removing a solution platform from Configuration Manager

I have a solution in VS2008 containing C# and C++/CLI projects. There are 3 "solution platforms" in my solution:

  • Any CPU
  • Win32
  • Mixed Platforms

I never want to "just build the 开发者_如何学GoC# ones" or "just build the C++ ones", I always want to build all projects. So the solution platforms metaphor is meaningless to me, I'll leave it on Mixed Platforms or whatever as long as they all build.

Now VS sometimes automatically switches the current solution platform to Any CPU (I'm not sure when or why). This means that pressing F7 will only try to build the C# projects, which is obviously no good. So I have to switch back to Mixed Platforms and try again.

So how to workaround this irritating problem? I have tried 2 ways:

  1. In Configuration Manager, remove the Any CPU and Win32 solution platforms. This worked until I added a new project and Visual Studio very kindly added them back in... :/
  2. In Configuration Manager, check all checkboxes for all projects in all configurations in all solution platforms. This becomes a nightmare to manage with many projects in the solution.

Any other ideas?


See the msdn:

http://msdn.microsoft.com/en-us/library/ms165408.aspx

Removing a Platform If you realize that you have no need for a platform, you can remove it using the Configuration Manager dialog box. This will remove all solution and project settings that you configured for that combination of configuration and target. To remove a platform

  1. On the Build menu, click Configuration Manager.
  2. In the Active solution platform box, select <Edit>. The Edit Solution Platforms dialog box opens.
  3. Click the platform you want to remove, and click Remove.


At least on Visual Studio 2005: After removing it from configuration manager, it is also necessary to edit .vcproj as text file and remove any references to Platform manually.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜