I\'m trying to check in a file, and one file (one and only one file) has a problem while being checked in. This file has been deleted many times and undeleted (due to a conf
I had something similar happen. Previously I had rolled back some changes and was reintroducing those changes in the solution and project files again with the same name. The problem that I found was a sql script rename was not in the Sql.proj file and I needed to add it and then close the solution to accept the changes to the proj file. Once I corrected the rename, made sure that it was in the project file, then I could check it in.
My solution was to exclude the culprit and check in the rest.
I then checked in the culprit.
( If you have a gated checkin you might have to turn that off first. )
1.From the File menu, click Source Control, and then click Workspaces.
2.In Manage Workspaces dialog box, under the Name column, highlight the workspace that you want to remove, and then click Remove.
3.In the Confirmation dialog box, click OK.
your work is done.
And map your solution again then you can work properly.
I renamed my workspace folder (the top level containing $tf) then did a get latest on the branch I wanted, then the unshelve worked.
This seems to be related to the workspace. I had this problem on one workspace but was able to perform the source control operation that triggered the error (rollback a previous rollback) in a different workspace without any problems.
Recreating your workspace might be a solution.
I suspect that somehow the items in the change set use the same ID twice, so the first INSERT is fine but the second will cause the violation. However, since they're in the same transaction, the first INSERT is rolled back and you don't see anything in tbl_PendingDelta afterwards.
See http://connect.microsoft.com/VisualStudio/feedback/details/693450/tfs-2010-violation-of-primary-key-constraint-pk-tbl-pendingdelta for another example of this issue.
I think you should take this up with Microsoft Product Support Services.