23

I'm involved in many projects and each project has their own source control provider. Is there a way to configure Visual Studio 2010 to automatically select the right source control on a per project basis? Or is the Tools - Options - Source Control plug in per user level?

Let me clarify what is happening. I have a project using Vault. When I open it VS sets the Source Control to Vault. I then close the project (solution) and open another solution that uses Mercurial (VisualHG) I check the Source Control plugin and Vault is still selected. Why? Is it possible to automatically select the right source control?

danio
  • 8,548
  • 6
  • 47
  • 55
Jonas Stawski
  • 6,682
  • 6
  • 61
  • 106
  • possible duplicate of [Can Perforce and SourceSafe co-exist in Visual Studio?](http://stackoverflow.com/questions/470134/can-perforce-and-sourcesafe-co-exist-in-visual-studio) – ChrisF May 13 '11 at 15:27
  • I don't think this is a duplicate. My question is not about coexisting, but about having VS set up the source control on a per project basis. – Jonas Stawski May 13 '11 at 15:47
  • another related answer, for the sake of completeness: http://stackoverflow.com/questions/2921233/per-project-source-code-providers-in-visual-studio – CAD bloke Jun 24 '12 at 20:17

4 Answers4

8

In order to automatically load a proper source control provider the solution file must contain Scc bindings.

I don't know if VisualHG supports them or not.

But you can try HgSccPackage - another mercurial plugin for MS Visual Studio 2008/2010 which supports Scc bindings.

You can get it here: http://www.newsupaplex.pp.ru/hgscc_news_eng.html

If you want to add Scc bindings to an existing controlled solution, use Mercurial -> Change SCC bindings menu from the IDE. (This menu will be available when the HgSccPackage is active and you have loaded a controlled solution).

For new projects HgSccPackage automatically adds Scc bindings. It is configurable via options though, for thouse who don't like this behavior.

gligoran
  • 3,267
  • 3
  • 32
  • 47
zz-sergant
  • 311
  • 1
  • 3
3

You might want to take a look at this question. It appears the answer is no, you have to select the correct provider for the project before working with the project, because only one source control provider can be active at a time.

Community
  • 1
  • 1
mellamokb
  • 56,094
  • 12
  • 110
  • 136
  • 2
    that is my question, I want for VS to automatically select the provider based on the project. I only work with one project at a time. It appears as if now it selects the last used. – Jonas Stawski May 13 '11 at 15:45
1

There's an additional VS plugin called Scc Auto Switcher that can help automatically switch between SCM systems used by different projects, although the docs don't specifically mention Vault.

Ken
  • 1,691
  • 5
  • 22
  • 38
0

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:

  1. Set the options to the "GIT" Plugin. Projects with GIT will work
  2. 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.

Ulli
  • 500
  • 1
  • 7
  • 19