I'm getting failures when Team City attempts to build my device driver the second time around after a reboot.
It cannot clean out the VCS root because a directory is locked and not sure why.
I'm getting failures when Team City attempts to build my device driver the second time around after a reboot.
It cannot clean out the VCS root because a directory is locked and not sure why.
Couldn't find reference to this question anywhere online ... so here it is ...
VS2012 and WDK 8.0 introduced a process called oacrmonitor.exe which performs static code analysis on device driver source code.
Unfortunately it seems to lock the directory that the source code is in, then on the next build of the same project, when the VCS root is cleaned, it fails to delete the locked directory, thus failing the build.
A reboot obviously will unlock the directory.
The only solution I've got so far is to attempt to kill the process immediately after the msbuild of the solution, you'll need something like this in DOS ...
x:\> taskkill /f /IM oacrmonitor.exe
or for nant ...
<exec program="cmd.exe" failonerror="false">
<arg line='/c @taskkill /F /IM "oacrmonitor.exe" >1 nul 2>&1 & rem and this causes nant to ignore errors' />
</exec>