清除TFS版本控制資訊

來源:互聯網
上載者:User

標籤:

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:

 

[plain] view plaincopy 
  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版本控制資訊

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.