Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change source control plug-in in Visual Studio

Currently the solution is managed by SVN and I want to switch to git. When I do Tools->Options->Source Control->Plug-in Selection and change plug-in I get this dialog:

enter image description here

I never get past that, when I open the .sln again it is still SVN.

I have a feeling I have done this many times in the past.

Additional info: The files are already managed by git, I just cloned it using git extensions and it was np. The issue is in VS.

like image 876
Johan Larsson Avatar asked Apr 27 '13 07:04

Johan Larsson


People also ask

How do I change the Source Control repository code in Visual Studio?

Select one of your repositories, and then select the repository location, which must be a folder. Once you choose the folder, you click the Select Repository Location button. After this, we need to set the Git username and email address with the git config command on the terminal.

How do I get Source Control in Visual Studio?

Source Control Explorer is available in Visual Studio, but isn't opened by default when working with a project managed in TFVC. You can open the Source Control Explorer window: From the Team Explorer home page (Keyboard: Ctrl + 0, H), choose Source Control Explorer. From the menu bar.


2 Answers

Suggestion: Don't bother with switching. Remove it from source control (SVN) and check it in anew (git). Or, if removing it by Visual Studio tools doesn't work, here's how you do it manually:

  1. Close Visual Studio;
  2. Delete the .svn folder
  3. Open the .SLN file in notepad, find the lines which specify the SCC provider, and delete them.
  4. Open the solution in Visual Studio again - it should not be under source control anymore and you should be able to check it in git.

Edit: Manually removing this from the .sln file did the trick:

GlobalSection(SubversionScc) = preSolution     Svn-Managed = True     Manager = AnkhSVN - Subversion Support for Visual Studio EndGlobalSection 
like image 128
Vilx- Avatar answered Oct 03 '22 04:10

Vilx-


The easier way to do it is a two steps process which can be done withput leaving Visual Studio:

  1. Open the menu option File > Source Control > Change Source Control. In the dialog use the Disconnect button.

  2. As described in the question itself, open the menu Tools > Options, and change the Source Control to git. This time it will change it without complaining at all.

like image 29
JotaBe Avatar answered Oct 03 '22 03:10

JotaBe