views:

94

answers:

2

(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,

  • Yngve
+1  A: 

Visual Studio support onlky 1 Source Control at once, so you need to swith providers through options BEFORE you open the solution. (open VS, switch providers, open solution).

Colin
I already tried that and it doesn't work. It switches to sourcesafe when I open the solution.
yngvedh
A: 

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.

yngvedh