Reputation: 455
About 2 years ago our company switched from Perforce to Git. I've been using the Git plugin in Visual Studio 2015 without any problems since then. Just in the last month or so when I start Visual Studio on any project, I receive the 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 plug-in, the active solution or project will be closed.
If I say yes, my solution is closed. If I then look at Tools / Options / Source Control, the plug-in is set to P4VS.
If I say no, my solution is left open, and the source code control is Git.
I've tried creating a Visual Studio project from scratch, controlled by Git, and I get the same results. This is a simple empty project. I've examined the .sln and .csproj files, and there are no source code control keys in either one.
If I simply open up Visual Studio without a project, my source control plug-in is set to Git.
It seems Visual Studio has decided that my projects are all controlled by Perforce and is considering Git to be a change, but I can't figure out how it is deciding this. Obviously, I can just click "No" and proceed but I'd like to fix this if I can.
Upvotes: 5
Views: 721
Reputation: 455
Since we don't use perforce anymore, I finally went into tools -> Extension and disabled P4VS (Perforce). That seems to have solved the problem.
As a side benefit, I was also having trouble where I'd try to delete a file from a project in VS, not get an error message, but the file wouldn't be deleted. When I disabled P4VS that problem seems to have gone away also.
Note: the issue was not due to the .suo file or anything in the .proj file, as I determined by removing the .suo and by creating a fresh, empty project and examining the .proj.
Upvotes: 1
Reputation: 30662
This looks similar to a problem describe Migrating from AnkhSVN to VisualSVN (AnkhSVN and VisualSVN are plug-ins for Visual Studio that add support for SVN, but the same should also work for other source control plug-ins). If that's your case, you can try the following:
<SccProjectName>XXXX</SccProjectName> <SccLocalPath>XXXX</SccLocalPath> <SccAuxPath>XXXX</SccAuxPath> <SccProvider>XXXX</SccProvider>
Upvotes: 0