visual source safe - how to remove bindings from solution w/o opening in visual studio
Asked Answered
W

5

13

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.

Weide answered 19/6, 2009 at 19:26 Comment(0)
W
23

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".

Weide answered 19/6, 2009 at 21:25 Comment(3)
It's amazing that this answer still gets regular upvotes in 2022! Are people still using visual source safe?Weide
Yes! I inherited a large legacy system that has been in VSS for more than 15 years. I'm attempting to do the same as OP - I want to strip VSS artifacts from VS2012 solution files without opening the solutions. I'm migrating the SCC to Git.Forwarding
using? no. Trying to kill? very much yes!Bernardinabernardine
D
7

In Visual Studio

  1. open your project,then goto
  2. File-->Source Control-->Change Source Control.
  3. select the project and/or solution
  4. click Unbind.

You also need to change read only attributes of all the files to read/write in order to be able to modify them later.

Dashed answered 5/6, 2013 at 9:18 Comment(0)
E
6

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.

Equivocate answered 9/5, 2013 at 18:59 Comment(1)
Nice solution! I was originally looking for was a menu option in VS. And as noted in the other answer, there is one, but it doesn't sound like it will clean up the readonly/hidden/system files. So doing that first is just as easy, and then VS prompting to unbind means I don't even have to search for the menu command! :-)Swatow
L
3

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

Lala answered 10/11, 2009 at 21:48 Comment(0)
P
0

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!).

Puncheon answered 19/6, 2009 at 20:4 Comment(2)
Yikes! I'm definitaly too lazy for all that.Weide
I thought I was too, until I had to do it... :-(Puncheon

© 2022 - 2024 — McMap. All rights reserved.