0

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.

4

1 回答 1

0

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" &gt;1 nul 2&gt;&amp;1 &amp; rem and this causes nant to ignore errors' />
</exec>
于 2013-05-08T10:00:27.230 回答