TFS Build keep throwing 'Unable to perform the get operation because the file already exists locally' error

Viewed 11735

I am currently working on an ASP.NET based web application which is version controlled via TFS. A TFS Build server is configured so it is running the build process on every checkin. My problem is that whenever I modify the Web.Config file and check in the modifications, the build process keeps throwing an error when getting the source which says 'Unable to perform the get operation because the file already exists locally'. I tried to remove the Web.Config from TFS and checked in the modifications, but the error was still there, saying 'Unable to perform the delete operation because the file already exists locally'. But when I manually delete the file from the build server's filesystem, the problem is gone. What do you think the problem is? I have not found anything relevant to this on google, so I would be really happy if you could help me. Thanks a lot!

5 Answers

I came across this thread after getting the error "Warning s - Unable to get because a directory already exists" in a build definition in TFS 2018. For me, I eventually figured out that the issue was because I specified the full solution path instead of just the solution directory in the server path of the build definition. Removing the solution name from the path (so it was just a folder reference) solved the issue. Hopes that helps others coming across this thread.

TFS Build Definition Image

In my case set clean to true didn't work, I just changed the local path directory to something different and it worked.

VSTS build

Related