visual-studio-2005visual-sourcesafeperforce

Why does Visual studio 2005 prefer "none" instead of perforce as source control provider


(Formerly: Help! Sourcesafe hijacks Perforce bindings in visual studio 2005)

Hi,

I'm currently having a problem with a visual studio solution. We're using perforce as our source control provider through the binding mechanism in visual studio.

My problem is that every time I open the solution sourcesafe will hijack the bindings and show me lots of errors about not being able to find the sourcesafe database. This problem is easily corrected by:

  1. Unbinding the solution and all projects.
  2. Go to options and change source control provider from sourcesafe to perforce.
  3. Rebinding the solution and all projects.

But! I don't want to do this every time i open the solution.

Does anyone her know what's going on here? I preferrably want to fix this without removing the sourcesafe plugin altogether.

Update:

I have removed some registry entries to keep VS from discovering the sourcesafe plugin. This works since sourcesafe no longer can be found in the list of providers in the options. The funny thing is that it still won't use perforce. When I open the solution I still get the errors and the provider is set to "none" in the options dialog.

It seems that this is not a sourcesafe problem, but a visual studio problem. Does anyone know where visual studio stores its bindings on a project and solution level? I have checked the .scc and .vssscc files and found no mention of perforce. (Other than project name: "perforce project")

regards,


Solution

  • After a lot of digging, in the registry as well. I found a little list of source control providers under the following key:

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\SourceControl\EngineNames]
    "0"="Sourcesafe"
    "1"="Perforce"
    

    After changing the order to:

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\SourceControl\EngineNames]
    "0"="Perforce"
    "1"="Sourcesafe"
    

    it correctly associates the projects with perforce. Why, you ask? I have no idea whatsoever. Whether or not this "fix" will mess with any bindings to sourcesafe remains to be seen though.