26

I noticed when Visual Studio 2012 RTM was closed, that many instances of MsBuild.exe are still in memory.

Why ?

2 Answers 2

51

The MSBuild processes are kept running for a period of time (fifteen minutes, I believe) after Visual Studio is closed. This is an attempt to improve performance, the idea being that idle MSBuild processes could be reused if another build is kicked off soon and the overhead of spawning a new process can be eliminated.

You can disable this by setting an environment variable MSBUILDDISABLENODEREUSE=1 (before starting VS) or specifying /nodeReuse:false (or /nr:false) if building from the command line.

Related issues filed on MSConnect:

1
  • Same issue on VS2013 SP1 and if you run "local builds" it will never work because MsBuild will always lock down your assemblies. This solution works like a charm on VS2013 Update 1.
    – Raffaeu
    Commented Apr 7, 2014 at 13:09
0

You can turn off the parallel build feature in visual studio. How to: Set the Number of Concurrent Builds for Multiprocessor Builds

1
  • Should describe the answer rather than putting a link up. Commented May 15, 2015 at 3:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.