为什么源代码管理条目不断被添加回我的 .sln 文件?

Why do source control entries keep getting added back to my .sln file?

我终于能够将遗留的 ASP.NET 项目交给 运行,我的任务是维护它。关于它的问题和我暂定的自动回答是

简而言之,似乎我需要做的事情之一就是清除 TFS 文件和 .sln 文件中引用它们的部分。

对于后者,我从解决方案 (.sln) 文件中删除了这些条目:

SccProjectName = "SAK"
SccAuxPath = "SAK"
SccLocalPath = "SAK"
SccProvider = "SAK"

...但由于某种原因它们已被添加回来,因此我的 .sln 再次包含它们,对于 context/full 披露是:

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.40629.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "MembersOrderEntry", "MembersOrderEntry", "{7D7D3972-0891-4600-BCBC-

CA40B0D0FF6E}"
    ProjectSection(WebsiteProperties) = preProject
        SccProjectName = "SAK"
        SccAuxPath = "SAK"
        SccLocalPath = "SAK"
        SccProvider = "SAK"
        TargetFrameworkMoniker = ".NETFramework,Version%3Dv3.5"
        Debug.AspNetCompiler.VirtualPath = "/MembersOrderEntry"
        Debug.AspNetCompiler.PhysicalPath = "MembersOrderEntry\"
        Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\MembersOrderEntry\"
        Debug.AspNetCompiler.Updateable = "true"
        Debug.AspNetCompiler.ForceOverwrite = "true"
        Debug.AspNetCompiler.FixedNames = "false"
        Debug.AspNetCompiler.Debug = "True"
        Release.AspNetCompiler.VirtualPath = "/MembersOrderEntry"
        Release.AspNetCompiler.PhysicalPath = "MembersOrderEntry\"
        Release.AspNetCompiler.TargetPath = "PrecompiledWeb\MembersOrderEntry\"
        Release.AspNetCompiler.Updateable = "true"
        Release.AspNetCompiler.ForceOverwrite = "true"
        Release.AspNetCompiler.FixedNames = "false"
        Release.AspNetCompiler.Debug = "False"
        VWDPort = "2030"
        VWDDynamicPort = "false"
        SlnRelativePath = "MembersOrderEntry\"
        DefaultWebSiteLanguage = "Visual Basic"
    EndProjectSection
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {7D7D3972-0891-4600-BCBC-CA40B0D0FF6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {7D7D3972-0891-4600-BCBC-CA40B0D0FF6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {7D7D3972-0891-4600-BCBC-CA40B0D0FF6E}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
EndGlobal

为什么要添加回 "SAK" 条目,如何防止这种情况再次发生?该项目不受源代码控制。

当我打开解决方案时,我看到一条消息,内容为“...找不到映射...暂时断开连接...”为什么它甚至期望找到映射?

项目所在的文件夹映射到 TFS 作为工作区。您将需要移动文件或删除工作区,否则 Visual Studio 将继续添加源代码管理。