Marijn
Marijn

Reputation: 10557

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

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 How to configure Visual Studio to use different source control providers and 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.

Upvotes: 53

Views: 7192

Answers (3)

Ulli
Ulli

Reputation: 510

Now we have 2023, and VS still supports only one SourceControl provider at a time. If you are looking for a solution that supports SVN and GIT and you use Tortoise SVN you can handle it like I do:

Set the options to the "GIT" Plugin. Projects with GIT will work Install the extension "TSVN 2022", it will provider a layer to the installed TSVN-Tools from VS. This way I can work with Projects in both systems without a need to change the options everytime.

Upvotes: 0

ceztko
ceztko

Reputation: 15207

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

Upvotes: 7

Joel Martinez
Joel Martinez

Reputation: 47749

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.

Upvotes: 32

Related Questions