博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
清除TFS版本控制信息
阅读量:7017 次
发布时间:2019-06-28

本文共 2123 字,大约阅读时间需要 7 分钟。

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

 

 

 

Ihave faced this issue when I decided to move one of my freelance project frommy own TFS to.

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:

 

[plain] 
 
  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  

 

你可能感兴趣的文章
[转]Bringing up interface eth0: Device eth0 does...
查看>>
zabbix监控mysql性能
查看>>
我的友情链接
查看>>
总结一下自己,知道自己需要做什么
查看>>
SQL语句学习之路6
查看>>
IPSEC
查看>>
Ubuntu Server 14.04 选择中文安装后日期乱码的解决方法
查看>>
mysql命令
查看>>
磁盘I/O调优参数
查看>>
linux性能故障排除
查看>>
DOS批处理——变量小知识
查看>>
自定义View时的onMeasure和onLayout方法
查看>>
【码云周刊第 16 期】扎心了老铁!那些优秀的网络爬虫工具介绍
查看>>
java中常用的工具类(二)
查看>>
动态规划算法-LCS
查看>>
openstack 之 windows server 2008镜像制作
查看>>
5_css控制文字及链接.txt
查看>>
【开班伊始】写下你的愿望清单,定制你的2015!
查看>>
学习使用资源文件[7] - 字符串资源
查看>>
如何检验网络安全建设和运维水平?
查看>>