I am having an issue with my ASP.NET Web-Api
solution where my build agent cannot clean its working directories because the library Microsoft.Bcl.Build.Tasks.dll
is still in use by some process so it cannot be deleted. The only things I do in my build agent are to build the solution using standard MSBuild.exe, and then I run a few unit tests using MSTest.exe.
I notice that Microsoft.Bcl.Build
version 1.0.14 (the version im using) is listed as a dependency by the Microsoft.Net.Http
and also by Microsoft.Bcl libraries
.
My workflow in the agent is like this:
- clone a git repo to the agent
- build the solution using msbuild
- test the solution using mstest
- some time later, maybe 10 minutes, I try and clean up the current iteration
- cleaning of the files fails due to the described error
My question is this:
Does anyone know why is this library in use by some process even after many minutes? Is there a common process on windows that would be using this library in the background? I would use the process manager to find why this file was in use, but these build machines are considered to be production boxes and are nearly impossible to get admin access to.
Thanks in advance for the help!