Mike Parkhill
Mike Parkhill

Reputation: 5551

How to switch from Ankhsvn plugin to VisualHG in Visual Studio 2010

When trying to switch my solution from using Ankhsvn to VisualHG (we've just migrated from SVN to Mercurial) I kept getting the following message:

"The active solution or project is controlled by a different source control plug-in than the one you have selected. If you change the source control plugin, the active solution or project will be closed. Do you wish to continue?"

The solution would then close and when I re-opened it it would still be linked to Ankhsvn.

I tried deleting the source folder and grabbing a fresh clone out of Mercurial, but the problem kept coming back.

Upvotes: 16

Views: 4066

Answers (3)

user2448451
user2448451

Reputation: 457

My solution is:

  1. open solution normally with vs
  2. disconnect all AnkhSvn project bindings
  3. change source control plugin to VisualHG and save all

Upvotes: 0

Aman
Aman

Reputation: 163

The above solution works but another way to do it without editing the sln is to open the project instead of the solution. Then change the setting at Tools->Options->Source Control->Plug-in Selection and change plug-in. Make sure you save all - this should save the new Source control to the solution.

Upvotes: 0

Mike Parkhill
Mike Parkhill

Reputation: 5551

The solution required opening the .sln file in a text editor and manually removing the following block:

-   GlobalSection(SubversionScc) = preSolution
-       Svn-Managed = True
-       Manager = AnkhSVN - Subversion Support for Visual Studio
-   EndGlobalSection

After that I was good to go.

Upvotes: 32

Related Questions