http://blog.csdn.net/feihu_guest/article/details/8442434

How to permanently remove TFS Source Control association bindings?

Ihave faced this issue when I decided to move one of my freelance project frommy own TFS toCodePlex.
To re-assign to a new Source Control, you need to remove association to old onefirst.

Anothercase when you may need this is when you renamed your TFS and your projectscannot find their code storage and you will see this warning each time you tryto open these projects:

Hereis how to remove this association:
1. Remove all *.vssscc and *.vspscc files from your Solution folders. 
2. Check if your Solution *.sln file is Read-Only. Remove this flag if needed. 
3. Open *.sln file in an editor. I prefer Windows Notepad for such operations. 
4. Find GlobalSection(TeamFoundationVersionControl) looking as showing belowand remove it begining with GlobalSection and ending with EndGlobalSection:

  1. GlobalSection(TeamFoundationVersionControl) = preSolution
  2. SccNumberOfProjects = 2
  3. SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
  4. SccTeamFoundationServer = http://<YourTFS>/tfs/defaultcollection
  5. SccLocalPath0 = .
  6. SccProjectUniqueName1 = <Your Project path and name in TFS>.csproj
  7. SccProjectName1 = <Project Name>
  8. SccLocalPath1 = <Project Path>
  9. EndGlobalSection

5.Save and close your Solution file.
6. Go ahead and open this Solution in Visual Studio IDE as usual. 
7. If you will get IDE warning similar as shown below, just select"Permanently remove source control association bindings".

That'sit! Now you can associate your code with a new TFS Project.
P.S. I tested this on VS/TFS 2010. Not sure if this works with older versions.


使用过程:我下载的vs2012的解决方案,用vs2015打开,因为这个是Team Foundation 项目的缘故,每次都提示连接服务器,如图1,图2所示。很麻烦啊,就想清除掉这些信息,一、删除掉MVC 项目下的web文件夹下的 *.vspscc文件,二、打开sln文件,删除掉以下代码,保存再打开就好了。

  1. GlobalSection(TeamFoundationVersionControl) = preSolution
  2. SccNumberOfProjects = 2
  3. SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
  4. SccTeamFoundationServer = http://<YourTFS>/tfs/defaultcollection
  5. SccLocalPath0 = .
  6. SccProjectUniqueName1 = <Your Project path and name in TFS>.csproj
  7. SccProjectName1 = <Project Name>
  8. SccLocalPath1 = <Project Path>
  9. EndGlobalSection

清除TFS版本控制信息的更多相关文章

  1. 去除TFS版本控制信息

    为了避免对版本库的影响,可以自己离线的修改代码,就要脱离TFS的管理,解决方案: 1.找到*.sln文件用文本打开,可以找到: Global GlobalSection(SolutionConfigu ...

  2. VS清除打开项目时的TFS版本控制提示

    原文:http://blog.useasp.net/archive/2015/12/15/how-to-permanently-remove-vs-project-TFS-source-version ...

  3. [转]VS清除打开项目时的TFS版本控制提示

    本文转自:http://www.cnblogs.com/weixing/p/5219294.html 对于曾经做过TFS版本控制的项目,在版本控制服务不可用的时候,依然会在每次打开项目的时候都提示:当 ...

  4. 快速清除文件夹svn版本控制信息

    将下面内容另存为clear.bat文件,在有版本控制的目录执行即可 @echo On @Rem 清除SVN版本控制信息 @for /r . %%a in (.) do @if exist " ...

  5. 去除TFS版本控制

    对于曾经做过TFS版本控制的项目,在版本控制服务不可用的时候,依然会在每次打开项目的时候都提示:当前项目是版本控制的项目,但是当前版本控制不可用,balabala的信息,如果是需要进行版本控制的项目在 ...

  6. 如何清除项目git版本控制信息

    首先进入项目目录下 邮件打开 git bash here 执行命令 find . -name ".git" | xargs rm -rf 就清除了git版本控制信息

  7. 如何移除解决方案中的TFS版本控制

    1.清除(删除)项目下的所有版本控制文件,这些文件有:*.vssscc,*.vspscc删除这些版本控制文件比较简单,搜索这些后缀的文件,删除即可. 2.修改项目的解决方案文件:*.sln (1).先 ...

  8. Sql Server脚本使用TFS版本控制

    原文:Sql Server脚本使用TFS版本控制 1.安装TFS插件 Microsoft Visual Studio Team Foundation Server 2010 MSSCCI Provid ...

  9. Spring Security怎样不让默认的ProviderManager清除密码等信息

    <authentication-manager erase-credentials="false"> ... </authentication-manager&g ...

随机推荐

  1. 层叠上下文(The stacking context)

    MDNThe stacking context 层叠上下文是HTML元素的三维概念,这些HTML元素在一条假想的相对于面向(电脑屏幕的)视窗或者网页的用户的z轴上延伸,HTML元素依据其自身属性按照优 ...

  2. css常用中文字体的英文名称写法

    我们知道网页中使用中文字体最好用其对应的英文名称,这样可以避免出现编码问题导致样式中的中文名称出现乱码,从而不识别.下面是网页中常用的中文字体所对应的英文名称.留着,不用翻资料了 中文 英文 宋体 S ...

  3. 教你10分钟内在Windows上完成Rails开发环境的安装和配置

    原文:http://www.cnblogs.com/tambor/archive/2011/12/25/rails_anzhuang_railsinstaller.html 一般来说,Windows开 ...

  4. Node.js开发环境搭建

    1.安装express npm install express -g 2.express33.6以后把express-generator分离出来了,所以还需安装express-generator,否则 ...

  5. C#事件与接口

    using System; namespace ConsoleApplication1d { delegate void MsgDel(string s); interface IMsg { even ...

  6. 小程序基础02:全局配置app.json

    1.配置 我们使用app.json文件来对来微信小程序进行全局配置. 作用:他决定了页面文件的路径,窗口表现,设置网络超时时间,设置多tab等 每一个小程序页面也可以使用 .json 文件来对本页面的 ...

  7. sys.stdin的三种方式

    1. for line in sys.stdin: import sys sys.stdout.write('根据两点坐标计算直线斜率k,截距b:\n') for line in sys.stdin: ...

  8. navigator.sendBeancon方法简介

    之所以介绍这个还在草案中的方法,是源于最近新做的一个活动.该活动有个需求,就是用户离开该页面的某个时间段之后,发个请求给该用户送券.后来是通过setTimeout来做的,用户离开该页面,该页面进入后台 ...

  9. CSS 实现加载动画之三-钢琴按键

    今天做的这个动画实现也是非常简单,简单数几行代码就可以搞定.给这个动画取了个优雅的名字--钢琴按键,也实在是想不出什么更形象的名字了.废话不多说,直接上图. 1. 先看gif图 2. 代码实现思路 2 ...

  10. [CareerCup] 9.7 Paint Fill 填充

    9.7 Implement the "paint fill" function that one might see on many image editing programs. ...