walterhuang
walterhuang

Reputation: 632

Item does not exist when check in TFS

I use VS 2013 to check-in a file to TFS 2012 and get the following error:

The item $/MyTeamProject/MyProject/MyInterface/IAllocationBLL.cs does not exist at the specified version, or you do not have permission to access it.

Other files just work fine. I notice that the Last Check-in date is missing.

enter image description here

If I undo this file, it then disappears on TFS. When I edit this file again, it back to TFS and still missing Last Check-in. I still get the same error checking in this file. Any advice would be appreciated.

Upvotes: 6

Views: 8305

Answers (3)

Mr.Robot
Mr.Robot

Reputation: 123

I received this error with Visual Studio 2019 and was able to resolve it by:

  1. Backup your project, just in case. You shouldn't need it though.
  2. Undo the changes for everything in the project in the Team Explorer.
  3. Go to the Source Control Explorer, Right Click the Project, and click Add Items To Folder.
  4. Select all the items in the project folder. Click Finish
  5. Items should reappear to check-in. Click Check-in and it should work.

Upvotes: 0

user3145824
user3145824

Reputation: 21

I had same/similar issue today. Didn't found proper (or easy) solution online, and here is my workaround:

  1. (Optional) Backup project just in case
  2. Delete file locally
  3. In Source Control Explorer undo changes (was delete because, auto generated files are always deleted then generated again, and i think this is just bug in studio). Ignore warnings. You will have now source controlled file with exclamation because file not exist.
  4. Open designer and just move some table and save - that will generate all files again without updating model from database.

VOILA - your file is under source control again.

Upvotes: 2

Teddy
Teddy

Reputation: 797

The best method is to save the file as a backup outside, and undo it, check in the whole project, then add the file to the project again.

Upvotes: 6

Related Questions