This Question is Answered

2 "helpful" answers available (2 pts)
1 Replies Last post: Feb 18, 2010 11:42 AM by Eugene Petrenko  
Andrew Arnott Newbie 32 posts since
Apr 6, 2009
Currently Being Moderated

Feb 17, 2010 10:07 AM

Parallel builds that don't lock custom MSBuild task DLLs

When I add "/m" to my MSBuild runner's command line arguments in my build configuration in order to get parallel builds, extra MSBuild.exe processes are spawned and reside in memory after the build is over (by design).  The trouble is these residual processes hold locks to managed assemblies that they loaded for custom tasks of a prior build.  These locks prevent future TeamCity builds from being able to update these DLLs, resulting in a build failure.


I wonder if TeamCity can search for and kill msbuild.exe processes when starting its own build to avoid this problem.  Ideally it won't kill active msbuild.exe processes it doesn't own, but that might be impractical.


Or is there some workaround I can use?

Eugene Petrenko JetBrains 2,380 posts since
Oct 4, 2004
Currently Being Moderated
Feb 18, 2010 11:42 AM in response to: Andrew Arnott
Re: Parallel builds that don't lock custom MSBuild task DLLs

I found /nodeReuse:<parameters> key of msbuild in the msbuild documentation at


Does this commandline parameter work for you?

More Like This

  • Retrieving data ...