views:

1550

answers:

3

Does anyone know of a good way to remove vss source control bindings for a visual studio 2005 and 2008 solution without opening it in visual studio?

I used to use: del /s /f /a: *.*scc Then when I opened visual studio it would prompt me and give me the option to "permanently remove bindings".

Now when I try this it recreates the .vssscc file and tells me my working copy contains a different version of the .vsscc file. There's is no option to remove source control bindings.

The real problem is that I'm trying to work on an old labeled copy of the solution from source safe. But, if I open the solution while it's still bound to source control it will get the latest version of the web site. It does this even though I have the option "Source Control-->Environment-->Get everything when opening a solution or project" unchecked.

A: 

I am not sure of the "best" answer, but I can supply some information: First the only sure fire way that I have come up with to separate a VS2005/2008 project or solution and VSS is to create a new solution and project with the same settings, in new folders, copy all of the modules, classes, forms etc. member files over and then add them to the project and finally, reset all of the project and solution attributes to match.

If someone has a better reliable way to do this I would love to hear it, but so far everything else that I have tried has resulted in breaking both the project/solution and the VSS integration.

AFAIK, the cause of this is that the binding between VSS and VS projects in the solution.SSC, solution.VSSSCC, solution.SLN, mssccprj.scc, vssver.ssc, and *.%proj files and maybe in the SUO as well (ugh!).

RBarryYoung
Yikes! I'm definitaly too lazy for all that.
Seth Reno
I thought I was too, until I had to do it... :-(
RBarryYoung
+1  A: 

I got this to work by editing the solution file as well as deleting the .scc files.

Here's what I removed from the solution file:

Under the section:

ProjectSection(WebsiteProperties) = preProject

I removed the following 4 lines:

        SccProjectName = ""$/HOS_amend.root/HOS", ENWBAAAA"
     SccAuxPath = ""
     SccLocalPath = ".."
     SccProvider = "MSSCCI:Microsoft Visual SourceSafe"

Also removed the entire section:

GlobalSection(SourceCodeControl) = preSolution

After doing this when I open the solution I get the prompt with the option to "permanently remove bindings".

Seth Reno
A: 

Just search your project for *.scc and .vss, delete all these, then open your project in Visual Studio 2008, which will ask you if you want to remove bindings or fix it

jerry