2008-10-17 92 views
9

我們經常在Visual Studio 2005和TFS中遇到此錯誤。「解決方案的源代碼管理似乎存在差異......」

任何人都可以幫助我們找出此消息的原因嗎?

完整的信息是:

There appears to be a discrepancy between the solution's source control information about some project(s) and the information in the project file(s).

To resolve this discrepancy it will be necessary to check out the project file(s) and update them. If the check out fails, however, and the solution is closed without saving, you will see this warning again the next time you open the solution.

單擊確定最終導致它要檢查出項目文件的整個列表檢出框。然而,「更改源代碼管理」窗口沒有顯示任何錯誤,並且保存所有內容並僅僅檢查回來,結果是「沒有改變,撤消所有」類型的消息。

編輯:你說得對,@Adam,我們已經從VSS轉換,但是我們通過這樣的方法去清理綁定時,我們前一段時間這樣做,一切都桃色的。這個錯誤最近開始出現了。

+0

我想出的答案,這個問題,因爲我的同事的人有未產生錯誤的文件。看看他們之間的差異:http://stackoverflow.com/questions/16616424/there-appears-to-be-a-discrepancy-between-the-solutions-source-control-informat – Denis 2013-05-17 21:01:48

回答

7

聽起來像你,你把項目從VSS移到TFS,原始的解決方案文件仍然綁定到VSS - 你需要重新綁定到TFS。

Here are the steps你需要這樣做來解決這個問題。我會在這裏提供一個摘錄,但它似乎取決於幾個因素,並不是微不足道的。

另外,這裏是一個線程,涉及project binding/unbinding如果上述不適用,可能適用。

-Adam

0

我們有2個解決方案和數百個項目。

我從VS 2008 SP1遷移到VS 2010 SP1和也被收到錯誤:

似乎有該解決方案的源控制信息之間的差異。 。 。

我會打開solution1,允許它更新項目,然後打開solution2,只是爲了再次得到這個錯誤。

我分析解決方案文件,發現如下:

根本原因:

solution1.sln和solution2.sln文件是關於項目的源代碼管理綁定相互不一致。

實施例:

solution1.sln

SccProjectUniqueName6 = Project1\\Project1.csproj 
SccProjectName6 = \u0022$/Project1\u0022,\u0020HSBAAAAA 
SccLocalPath6 = Project1 

solution2.sln

SccProjectUniqueName6 = Project1\\Project1.csproj 
SccLocalPath6 = . 
SccProjectFilePathRelativizedFromConnection6 = Project1\\ 

解決方案:

我通過手動修改解決方案文件是在一致的固定這個問題記事本。我將來自solution1.sln的源代碼控制信息複製並粘貼到solution2.sln中,用於他們共同使用的項目。

我最終寫了一個小工具來實現這個功能。

https://github.com/bentoo/MergeSolutionSourceControl

相關問題