0
votes

I am struggling to solve a problem with Team Foundation Server (yeah, I should just go with Git, I know...). We are working on a mid-sized solution (<20 projects) and suddenly in my workspace I cannot make check-ins or check-outs anymore. Everytime I try to, I get a very generic error message:

An item with the same key has already been added.

This is either shown in a dialog box, in the output window of Team Foundation Server or at the top of the Team Explorer window in Visual Studio 2013.

I already tried deleting the TFS cache located under

C:\Users\[my username]\AppData\Local\Microsoft\Team Foundation\5.0\Cache

and

C:\Users\[my username]\AppData\Roaming\Microsoft\VisualStudio\12.0\Team Explorer

Cleaning the solution does not help, and neither does restarting Visual Studio. Other members of my team still can do check-ins and check-outs. Also I found that the issue is not only related to this solution (although it was the only one I have been working on the last few weeks). Regardless what project I try to open, I get the same error message from TFS. However, if I choose another workspace and try to open projects from there, no error appears and all just works as usual.

Any suggestions on how to resolve the issue?

3

3 Answers

0
votes

I solved the issue (at least temporarily) by changing to another workspace and checking out from there. Here are the steps I went through:

  1. Go to "File"-> "Source Control" -> "Advanced" -> "Workspaces..." and add a new Workspace
  2. Open the "Source Control Explorer" window and make sure you have the new workspace selected in the upper combobox. Note: You may get several dialog boxes with the error message stated above.
  3. Select your solution from the left folder tree and right-click on it
  4. Choose "Get latest version" and the Map dialog will appear. Choose a new folder. Perhaps you could have renamed the original folder and reuse the same location then...
  5. Now make the first check-out and that's it!
0
votes

I saw this error when we were migrating to new tfs and new Gated build with the same was created for the same branch. After disabling renaming/disabling new build issue disappeared.

0
votes

Close Visual studio, Delete the ".vs" hidden folder, and try again.