views:

1361

answers:

3

How do I prevent Visual Studio 2008 from automatically creating the "Mixed Platforms" and "Any CPU" solution configurations? We have "Win32" and "x64" configurations and a developer needs to choose between them. However, as soon as anyone makes any changes to the solution VS automatically creates "Mixed Platforms" and it seems to be the default configuration. This causes a lot of issues, because it turns out some new projects are not selected in this configuration or the wrong project configuration is selected, etc. I just want to stop it doing that and manage the solution configurations myself.

+4  A: 

We see a similar issue with Visual Studio 2005 projects that we want to build both for a Win32 configuration and for a number of distinct smart device platform/configuration combinations.

At arbitrary times, every configuration gets auto-generated for every platform, whether it's valid or not, exploding the size of each of our ~50 project files and causing a lot of work to fix the issue.

It consistently happens when we open the Configuration Manager dialog, and it sometimes (but not always) happens when changing a project setting for a configuration. In the latter case, it seems to be related to manipulating the platform and configuration drop-downs on the project setting dialog.

We filed it as a Visual Studio issue; MSFT closed it as "won't fix".

Tim Lesher
A: 

You could filer your sln files in a commit hook of your source control. So that if you check it in the sln file and possibly the project files get fixed. The open source Chromium project has such a filer implemented.

frast
I suppose so, but that would be a huge hassle and probably quite unreliable. The risk of stuffing up the sln file wouldn't be worth the benefit.
Evgeny
A: 

We have a similar issue with Visual Studio 2005. We use Crystal for Visual Studio 2005 and that is x86 only, but we develop on X64. We want everything in our solution to be x86 always, but every time we add a project we have to change the target from "Any CPU" to "x86". This is ridiculous.

IMHO, the solution should have a default configuration and every project that gets added to the solution should inherit that configuration if it does not already have its own configuration.

Jim Clark