Quantcast
Channel: MSBuild forum
Viewing all articles
Browse latest Browse all 2763

Parallel Build Termination Leaves Child MSBuild.exe Processes Running

$
0
0

Hi all,

We encapsulated building embedded code in MSBuild project files, predefining the proper dependencies, to run them in parallel and reduce build time.

It was working beautifully with significant reduction in time until we noticed that terminating the command-line build with CTRL-BREAK caused the main MSBuild.exe process to stop but the child processes kept on running. Using Process Explorer, you can see how the MSBuild-spawned (via the Exec task) kept on running in the background. I assume they would go away once the called task is done. Anyway, this would be problematic if the developer tried to initiate another build.

My questions are:

  • Is this the expected behavior from canceling a build? Does this problem exist for parallel compilation of Visual Studio projects as well?
  • Is there a cleaner way to cancel the build? (Have the parent MSBuild process somehow signal the child ones to stop?)

I assume if one of the Exec task-called processes failed naturally, then the build would stop gracefully (all MSBuild processes disappear).

Thanks in advance!

 


If you can read this, you're too close.

Viewing all articles
Browse latest Browse all 2763


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>