Visual Studio solution TFS check in

最后都变了- 提交于 2019-12-25 12:41:43

问题


I'm using TFS 2012 with VS 2012 Ultimate at work. An employee (who is not working here anymore) had some pending changes in our solution (which contains C#, SQL and C++ projects), but our Dev Ops has undone them using:

tf undo /workspace<the_worskpace> <files> /s<our_TFS_server>

In Source Control Explorer I can confirm that those pending changes were indeed reverted. I'm the only one working on this solution at the momment. No one else has pending changes. Another aspect is that both the .sln and the .vssscc files are checked in.

When I open the solution, I get:

While attempting to update source control binding information, Microsoft Visual Studio
could not check out the project file, possibly because it is exclusively checked out to
another user. You must check out the project file as soon as possible, to reconcile the 
local changes with the master copy.

Then the projects start initializing and then start loading. In the middle of this process I get:

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.

I've tried unbinding / binding the solution file, but that didn't work. I've also tried the solution provided here http://connect.microsoft.com/VisualStudio/feedback/details/573538/visual-studio-2010-with-tfs-2010-always-checks-out-the-solution-file-when-opening but I don't have

GlobalSection(ExtensibilityGlobals)

in my .sln.


回答1:


The solution provided here seems to work. Here is what I've done:

  • Unbound all files from source control.

  • Deleted the following lines from all .csproj files:

<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
  • Rebound all files to source control.

  • Closed and reopened solution.



来源:https://stackoverflow.com/questions/20968233/visual-studio-solution-tfs-check-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!