TFS Build keep throwing "Unable to complete get operation because file already exists locally"

I am currently working on an ASP.NET-based web application that is versioned via TFS. The TFS Build server is configured so that it starts the build process on each test. My problem is that whenever I modify the Web.Config file and check the changes, the build process continues to throw an error when I get the source, which says: "Unable to execute get operation because the file already exists locally." I tried to remove Web.Config from TFS and check its modifications, but the error was still there: "The delete operation could not be completed because the file already exists locally." But when I manually delete the file from the build server file system, the problem disappeared. What do you think is the problem? I did not find anything suitable for this on Google, so I would be very happy if you could help me. Thank you very much!

+6
source share
5 answers

In TFS 2015, VSTS, I solved the problem by choosing true in the drop-down list below:

enter image description here

Do not forget to set it to false after the successful completion of the assembly, because if you leave it turned on, it will always be cleaned and, therefore, the assembly will take longer.

+15
source

In your assembly definition, do you have the Clean workspace option for Everything ?

enter image description here

If this does not help, can you install Logging Verbosity Diagnostics and see if there is more information about this issue.

+1
source

Since you are working with the TFS 2015 Build (and not the XAML Build), you can check Clean on the definition repo tab.

FYI is a new agent on VSTS and in TFS 15 RC1 goes through /overwrite before tf get , so you do not need to do a clean build every time.

+1
source

In my case, setting true to true didn't work, I just changed the local path directory to another, and it worked.

Vsts build

0
source

I stumbled upon this topic after receiving the error β€œWarning s - Unable to get because the directory already exists” in the build definition in TFS 2018. For myself, I eventually found out that the problem was that I indicated the full solution path instead of just solution catalog on the path to the assembly definition server. Removing the solution name from the path (so that it was just a link to the folder) solved the problem. Hopes that help others meet this topic.

TFS Build Definition Image

0
source

Source: https://habr.com/ru/post/1245645/


All Articles