I ran into a snag, though. If a task involves a long-running external process - say, robocopy'ing a large directory structure, killing the msbuild process doesn't kill the child process. Robocopy keeps on running, leading to a lot of cursing about how slow the network is until you notice it running two dozen times.
BTW, here's a powershell snippet to kill all robocopy processes:
get-process -Name robocopy | foreach-object { $_.Kill() }
Under normal circumstances, the runaway processes shouldn't be a problem. Under other circumstances, this could be a big deal.
MSBuild exposes its object model. It should be possible to either write a wrapper, or a better exec task. One way or the other, it isn't as cut and dried as I'd hoped.
No comments:
Post a Comment