Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure Visual Studio to use different source control providers

Tags:

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?

like image 572
Jonas Stawski Avatar asked May 13 '11 15:05

Jonas Stawski


People also ask

How do you add Source Control in VS?

To add projects to source control Open the solution in Visual Studio 2010. In the Solution Explorer window, right-click the solution, and then click Add Solution to Source Control.

How can I add Source Control in Visual Studio 2019?

From the main menu, Tools -> Options and then navigate to. Under the Plug-in Selection, you will find it is already set to “None. From the plug-in selection drop-down, you can choose either Git or Visual Studio Team Foundation Server. Visual Studio will enable the plugin for the specific source control accordingly.


2 Answers

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.

like image 157
zz-sergant Avatar answered Oct 22 '22 06:10

zz-sergant


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.

like image 40
mellamokb Avatar answered Oct 22 '22 04:10

mellamokb