Serge Wautier
Serge Wautier

Reputation: 21898

How to set a default configuration in a Visual Studio Solution File?

In VS2005 and up, is it possible to specify which configuration should be selected by default?

I have several configurations in my solution but one of them should be used in most cases. Hence I'd like to make sure that devs who pull it out of Source Control use the right configuration(unless of course they specifically choose another one).

Ideally, this setting should be in the .sln file since that one is under Source Control.

Upvotes: 20

Views: 18063

Answers (3)

Ringil
Ringil

Reputation: 6537

This is pretty old, but this was helpful for me:

It by default picks its platform as Mixed Platform. If that doesn't exist, it picks the first listed in your .sln file.

The default configuration is something that starts with Debug. So if you have something called Debug Test, it will select that. If that doesn't exist, it goes by order in your .sln file. It will not pick Test Debug over Debug.

Upvotes: 10

abatishchev
abatishchev

Reputation: 100368

As far as I understand, if there is no .suo file, first platform in alphabetic order becomes the default configuration.

Upvotes: 18

JB Brown
JB Brown

Reputation: 614

I don't know if I understand the complete situation behind your question, but there is a way to "externalize" some of VS.Net's project configuration values such as FxCop settings into a separate file. Then you could have all projects in a solution point to that file. However, I don't think it would allow for your devs to chose their own configuration after doing the "externalization"

If this seems like the right path for you, check out these posts from me in regards to coding standards on how to make similar changes for configuration.

Upvotes: 1

Related Questions