Error while applying patch: Failed to delete: in build working directory

I get the following TeamCity error from time to time:

     "Error while applying patch: Failed to delete:"

Usually I find this is because the file is in use for some reason or another.

My question is:   Is there a way that I can tell TeamCity to generate a new build working directory

I am not asking how to specify a custom / static working Directory.  I am asking if I can get TeamCity to pick a new generated build working directory.

Comment actions Permalink


Then your build server will be quickly overloaded by ophaned processes and open file handles.
The solution you are suggesting is not effective actually. It would make sence to find a root cause of the issue.
Also try Build Cleaner feature. On Windows agents it can close handles automatically.

Comment actions Permalink

Thank you Michael.  It actually occurrs rarely.  

But Build Cleaner appears as if it will do the trick. Thanks again.


Please sign in to leave a comment.