如何摆脱“你试图打开的解决方案必然是源控制”的消息

时间:2014-02-19 14:16:42

标签: visual-studio visual-studio-2012 tfs tfs2012

我有从源控制解决方案复制的Visual Studio解决方案文件。我不希望它是源代码控制的,当我打开它时,我收到消息:the solution you are trying to open is bound to source control

我删除了.vssscc文件,但仍然收到了消息。我怎么能摆脱它?

感谢。

1 个答案:

答案 0 :(得分:40)

您需要通过删除以下GlobalSection来清理解决方案文件(.sln):

GlobalSection(TeamFoundationVersionControl) = preSolution
    SccNumberOfProjects = 2
    SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
    SccTeamFoundationServer = http://example.com/tfs/defaultcollection
    SccLocalPath0 = .
    /// --- more solution specific stuff omitted --- ///
EndGlobalSection

并且您需要从每个项目文件中删除源代码控制引用(C#项目的.csproj):

...
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
...