TFS error: item has pending changes but does not exist locally
Solution 1
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.
Solution 2
Not sure about this but have you checked out a different workspace? Try going to View->Other Windows->Source Control Explorer, then open the Workspace dropdown near the top of the screen, and select "Workspaces..
Solution 3
As it was suggested here, just undo this change, and download will start normally.
To explain what's going on: there are certain conditions on locally changed items (files and folders), and if they are not met, TFS can interrupt downloading sources from server. One of such conditions is that item which is regarded by TFS as locally changed (no matter if you intend to check-in it or added it to "Excluded changes") should actually exist.
For example, some local file was marked to be added to TFS, but not checked in. After that, it was locally deleted from disk. But local TFS still remembers about its existence. So the message tells you that TFS is unable to download new version if the information that this file should be added still exists.
Solution 4
Right click on the problematic file in Solution Explorer and click add item to source control.
Solution 5
Faced similar message with VS2017. However doing source control -> undo didn't work, it produced message "No pending changes were found for " and problem persisted. Resolution: - do "Check out for edit" on problematic file(s) - source control -> undo - get latest
Related videos on Youtube
JosephDoggie
I have been a professional software/firmware developer for about 27 years. I am currently working in various versions of SQL as well as vue (js) and java. Background: I also have experience with the C-family languages, and (a long time ago) DSP algorithms and have a PhD in EE in the DSP-field. I am a Christian, I love Jesus. I have a wife and 3 children, 2 of whom are adults. As my Display Name suggests, I also love dogs. We currently have two rescue dogs.
Updated on September 15, 2022Comments
-
JosephDoggie over 1 year
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.
-
Darren Lewis over 9 yearsHave you checked the file out then deleted it from the local file system rather than through VS?
-
MrHinsh - Martin Hinshelwood over 9 yearsYou should never delete files locally is using server workspaces with any version of VS
-
-
JosephDoggie over 4 yearsThanks for updating this question for future viewers; I've noticed some activity on it lately, possibly due to a new Microsoft bug (for all I know).