Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to switch to TFS automatically when solution is loaded?

I have an annoying problem with source control plugins... I'm using VS2012 and I have some projects on TFS and others on SVN (using AnkhSVN).

When I open a SVN solution, VS seamlessly switches to AnkhSVN as the source control plugin, which is fine. But then, when I open a TFS solution, it doesn't switch back to TFS... the most annoying effect is that automatic checkout doesn't work. To fix it, I have to unload the solution, changes the source control plugin to TFS, and reload the solution.

Is this a known problem? Is there a way to fix it?

like image 994
Thomas Levesque Avatar asked Sep 29 '12 23:09

Thomas Levesque


1 Answers

There is not a good option that I can think of. That part of Visual Studio is designed to work only with one Source Control system at a time and I understand your pain.

I guess my first question is why you need both, but I guess there is some need somewhere. You can see folks with the same problem:

  • How to quickly switch source control providers in Visual Studio 2010?

Option 1: Virtualisation

As I have a machine capable of running VM's (Windows 8 with Hyper-V) I would have two VM's with one configured for TFS and the other configured for SVN. Not elegant, but it would allow you to switch.

Option 2: Regedit

You can change the setting in the registry.

HOW TO: Change Source Control Providers If Two or More MSSCCI-Compliant Providers Are Installed

So you could have a "key" file for each setting stored on your desktop and:

  1. Close Visual Studio
  2. Run registery key
  3. Open Solution

While ugly and requires remembering it would be the best option locally.

Conclusion

There is no good answer but I do think that the two options above will get you there.

like image 53
MrHinsh - Martin Hinshelwood Avatar answered Oct 25 '22 11:10

MrHinsh - Martin Hinshelwood