且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Visual Studio 解决方案 TFS 签入

更新时间:2022-10-21 08:08:28

提供的解决方案 此处 似乎有效.这是我所做的:

  • 从源代码管理中解除所有文件的绑定.

  • 从所有 .csproj 文件中删除了以下几行:

SAK<SccLocalPath>SAK</SccLocalPath><SccAuxPath>SAK</SccAuxPath><SccProvider>SAK</SccProvider>

  • 将所有文件重新绑定到源代码管理.

  • 已关闭并重新打开的解决方案.

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.

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.