视觉源安全--如何从解决方案中删除绑定,而不在视觉工作室中打开?[英] visual source safe - how to remove bindings from solution w/o opening in visual studio

本文是小编为大家收集整理的关于视觉源安全--如何从解决方案中删除绑定,而不在视觉工作室中打开?的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

有人知道删除Visus Studio 2005和2008解决方案的VSS源控制绑定的好方法,而无需在Visual Studio中打开它?

我曾经使用:del /s /f /a: *.*scc 然后,当我开设Visual Studio时,它会提示我,并给我选择"永久删除绑定".

现在,当我尝试此操作时,它会重新创建.vssscc文件,并告诉我我的工作副本包含.vsscc文件的不同版本.没有选择删除源控制绑定.

真正的问题是我正在尝试从SACE中处理旧标记的解决方案副本.但是,如果我打开该解决方案,那么它仍一定要源控制,它将获得该网站的最新版本.即使我有"源控制 - >环境 - >打开解决方案或项目"时,它也可以做到这一点.

.

推荐答案

我通过编辑解决方案文件以及删除 *. *SCC文件来工作.

这是我从解决方案文件中删除的内容:

在本节中:

ProjectSection(WebsiteProperties) = preProject

我删除了以下4行:

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

还删除了整个部分:

GlobalSection(SourceCodeControl) = preSolution

在打开解决方案时执行此操作后,我将获得以"永久删除绑定"选项的提示.

其他推荐答案

在Visual Studio中

  1. 打开您的项目,然后Goto
  2. 文件 - >源控制 - >更改源控制.
  3. 选择项目和/或解决方案
  4. 单击Unbrind.

您还需要更改仅读取所有文件的属性要读/写,以便以后进行修改.

其他推荐答案

这是我用来删除所有源控件文件的.cmd文件:

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

之后,您可以在Visual Studio中打开并提示删除源控制绑定(这删除了Seth Reno提到的行,即.

    SccProjectName = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    SccAuxPath = "x"
    SccLocalPath = "xxx"
    SccProvider = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

)

,或者您可以进行某种正则表达式删除,但我没有代码.

本文地址:https://www.itbaoku.cn/post/1875633.html

问题描述

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.

推荐答案

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

其他推荐答案

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.