8

I am using Android studio, where I always working with Git, but in Visual studio 2015 I am working with VFS. Problem is, Visual Studio always connect to my Git repo. instead to Team Fundation Server. When I reconnect to VFS and select one from my solutions, Visual Studio reconnect back to Git. So VFS is useless.

I tried to managed this problem with registry hack like here: Question from: Matthew Kraus but no luck.

I want to use only VFS in Visual Studio, Git could be removed permanently.

genpfault
  • 51,148
  • 11
  • 85
  • 139
Bluf
  • 250
  • 2
  • 14
  • Does VFS mean TFS(team foundation server)? Could you let us know which version of TFS are you using? Have you created git team project or TFVC team project? – Cece Dong - MSFT Jan 25 '16 at 06:36
  • I have found a reasonable solution to use TFS in VS2019 and Git from outside VS2019: stackoverflow.com/a/61658739/306074 – Anlo May 11 '20 at 06:34

1 Answers1

12

Problem solved using by this:

Here's how to disable the package that is responsible for loading the Git source control support in Visual Studio. Use at your own risk!

  1. Create a file called devenv.pkgundef and place it next to devenv.exe in you Visual Studio's Common7\IDE (you'll need elevation for this)

  2. Add the following entries to the file: [$RootKey$\Packages\{7fe30a77-37f9-4cf2-83dd-96b207028e1b}] [$RootKey$\SourceControlProviders\{11b8e6d7-c08b-4385-b321-321078cdd1f8}]

  3. Close VS if open, open a Developer command prompt, and type devenv /updateconfiguration

  4. Start VS, and voilla - Git support no more!

To undo, delete the devenv.pkgundef file, and run devenv /updateconfiguration again.

urig
  • 16,016
  • 26
  • 115
  • 184
Bluf
  • 250
  • 2
  • 14
  • 1
    While it works, it also cripples your manage connections. YMMV – TombMedia Apr 13 '16 at 22:04
  • 1
    Sometimes it throws error when you disconnect from TFS. It could be solved by restarting VS, or if you relog to your VS account. – Bluf Oct 22 '16 at 07:20
  • 1
    It removed GIt, however, It kept throwing "System.Runtime.InteropServices.COMException (0x80004005):" on TFS after this. I recommend you do not try this on VS2015. – FerX32 Dec 29 '16 at 05:38
  • Usually restart of Visual Studio fixed it. – Bluf Jan 02 '17 at 11:50