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

时光怂恿深爱的人放手 提交于 2019-11-30 08:54:38

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

Murugesan Yadav

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.

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.

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

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!