2016-03-08 98 views
0

我轉換VS2008項目TFS連接信息通過命令行的Visual Studio 2015升級刪除從的.sln

devenv.exe "filepath" /upgrade 

當運行此過程中,下面示出的TFS連接信息從的.sln除去vs2015文件。

GlobalSection(TeamFoundationVersionControl) = preSolution 
    SccNumberOfProjects = 2 
    SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} 
    SccTeamFoundationServer = http://tfsserver:8080/ 
    SccLocalPath0 = . 
    SccProjectUniqueName1 = ProjectName.vbproj 
    SccLocalPath1 = . 
EndGlobalSection 

有沒有辦法阻止這種情況發生?

+0

升級後在Visual Studio 2015中打開升級後的解決方案時會發生什麼情況? –

+0

這是否只發生在一個項目或全部?沒有其他參數運行'devenv/upgrade'命令。 –

+0

@MHHinsh - 解決方案不再侷限於TFS –

回答

1

它是由設計。

對於VS2008,TFS連接信息與.sln文件關聯。

但是,對於VS2015,此連接信息不再與其關聯。它存儲在VS緩存的TeamExplorer.xml文件中。您可以在以下路徑找到它:C:\用戶\ XXX \應用程序數據\漫遊\微軟\ VisualStudio的\ 14.0 \團隊資源管理器\ TeamExplorer.xml

<!--This configuration file specifies the previously-configured connection details for Team Foundation Server.--> 
<server_list> 
    <server url="http://xxx:8080/tfs" current="yes"> 
     <collection guid="145cdf8f-4c6e-47ba-9d9a-4e7328506929" url="http://xxx:8080/tfs/defaultcollection" name="xxxx\DefaultCollection" current="yes" autoload="yes"> 
... .... 

這個信息是沒用的,所以升級中刪除。您必須手動將sln文件重新映射到TFS。

+0

這使我在正確的軌道上,當2017年使我的基於git的本地TFS服務器消失,但我需要更新VS的Git中的起源URL,以識別TFS而無需重新克隆。 – mlhDev

相關問題