Change source control plug-in in Visual Studio

送分小仙女□ 提交于 2019-11-30 11:46:47

问题


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:

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.


回答1:


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



回答2:


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 > Subversion > 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.




回答3:


What actually helped me, I could not find in my Asp.net core solution folder any svn file or .git, but it was in C:\Users\NAME, deleted there .git file, it was HIDDEN. Then in vs automatically source control changed from git to TFVS. however it somehow created in my solution folder git files, deleted once more and it started to work fine.




回答4:


The proper way to remove these settings for SCC providers is File -> Source Control -> Change Source Control. Where AnkhSVN calls the 'Source Control' menu 'Subversion'.

This trick should work for all well behaved SCC providers (VSS, TFS, AnkhSVN, etc. etc.)



来源:https://stackoverflow.com/questions/16249595/change-source-control-plug-in-in-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!