简体   繁体   English

TeamCity使用包含设备驱动程序的C ++项目无法清除目录的VS2012解决方案构建

[英]TeamCity builds of VS2012 solutions with C++ projects containing Device Drivers failing to clean directories

I'm getting failures when Team City attempts to build my device driver the second time around after a reboot. 当Team City重新启动后第二次尝试构建设备驱动程序时,我遇到了故障。

It cannot clean out the VCS root because a directory is locked and not sure why. 它无法清除VCS根目录,因为目录已锁定并且不确定原因。

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. VS2012和WDK 8.0引入了一个称为oacrmonitor.exe的进程,该进程对设备驱动程序源代码执行静态代码分析。

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. 不幸的是,它似乎锁定了源代码所在的目录,然后在同一项目的下一个构建中,当清理VCS根目录时,它无法删除锁定的目录,从而使构建失败。

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 ... 到目前为止,我唯一的解决方案是尝试在解决方案的msbuild之后立即终止进程,您在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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM