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: <
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
In Visual Studio
You also need to change read only attributes of all the files to read/write in order to be able to modify them later.
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".
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!).
This is the .cmd file I use to remove all source control files:
:: *.scc
:: ===========================================================================
attrib /s -h -s "*.scc" :: Must get rid of system and hidden attributes
attrib /s -r "*.scc" :: at same time
del /s "*.scc"
:: *.vssscc
:: ===========================================================================
attrib /s -h -s "*.vssscc"
attrib /s -r "*.vssscc"
del /s "*.vssscc"
:: *.vspscc
:: ===========================================================================
attrib /s -h -s "*.vspscc"
attrib /s -r "*.vspscc"
del /s "*.vspscc"
:: *.vsscc
:: ===========================================================================
attrib /s -h -s "*.vsscc"
attrib /s -r "*.vsscc"
del /s "*.vsscc"
After which you can either open in Visual Studio and get prompted to remove source control bindings (which removes the lines mentioned by Seth Reno, ie.
SccProjectName = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
SccAuxPath = "x"
SccLocalPath = "xxx"
SccProvider = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
)
Or you could do some kind of regular expression removal, but I don't have code for that.