How to specify the source control plugin on a per-solution basis in Visual Studio?

Visual StudioVisual Studio-2010Version Control

Visual Studio Problem Overview


I just installed AnkhSVN to have subversion support from within Visual Studio 2010. I noticed I had to go to Tools > Options > Source Control to select the current source control plugin.

At the moment, I'm working on multiple projects using different version control systems. For instance, I also have some projects in Mercurial, for which a VS source control plugin is available.

Is there any way to specify the source control plugin on a per-solution basis? Or can VS detect the used vcs automatically? What are the best practices in this respect?

Edit: a google search led me to https://stackoverflow.com/questions/5994009/how-to-configure-visual-studio-to-use-diferent-source-control-providers and https://stackoverflow.com/questions/470134/can-perforce-and-sourcesafe-co-exist-in-visual-studio. Both cover the same ground, but appear to be specific to specific vcs and lack a satisfying general answer. I'm looking for a general answer here.

Visual Studio Solutions


Solution 1 - Visual Studio

There is unfortunately no good answer here. You will simply have to go in and manually change you visual studio source control provider settings before you open the project. This is a limitation of how this particular plugin system works, and will probably take a new version of visual studio to specifically address it.

This is an instance where visual studio works better for the enterprise shop with standardized source control tools, and not as good for a contractor working with multiple clients across an array of technologies.

Solution 2 - Visual Studio

Source control provider auto switching based on reserved directory presence can be done with a VS extension as described here.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMarijnView Question on Stackoverflow
Solution 1 - Visual StudioJoel MartinezView Answer on Stackoverflow
Solution 2 - Visual StudioceztkoView Answer on Stackoverflow