C# – TFS error: item has pending changes but does not exist locally

cprojects-and-solutionstfsvisual-studio-2013

The following TFS error occurs using Visual Studio 2013 to interface to TFS (TFS apparently also carries the version of Visual Studio with it):

item has pending changes but does not exist locally

This seems very wrong, as one chief purpose of TFS is to give me items that do not exist locally.

Sometimes (but not always) this occurs after a delete, and the purpose is to restore / update the file from the server.

Best Answer

In the Solution Explorer:

  • right click on file that gives error=>Source Control=>Undo Pending Changes.

  • right click on file=>Add file to Source control.

Now you are good to go.