Share via


Running parallel builds in msbuild using Team Foundation Server 2015 V-next Builds

Deepak Kumar Mishra, Support Engineer, EMEA TFS Team, brings this knowledge experience while working with one of his customers and this important piece of information might help a lot of users who wish to run parallel builds in msbuild using TFS 2015 V-next builds .

Issue:

Running parallel builds in msbuild using TFS 2015 V-nextBuilds

Troubleshooting:

While checking an issue where we want to run parallel builds in TFS 2015, it failed with

Log excerpt:

10:06:29.835452BaseLogger.LogConsoleMessage(scope.JobId =71a852c0-0c02-4acb-a1f2-f0335b7d26c0, message = Clean is set to true. Removing
all repository folders.)

10:06:29.836455BaseLogger.LogConsoleMessage(scope.JobId =71a852c0-0c02-4acb-a1f2-f0335b7d26c0, message = Deleting path:D:\BA\W0\43d9791a\idc-test)

10:06:37.813963---------------------------------------------------------------------------

10:06:37.822967System.ArgumentException: Illegal characters in path.

 We did some initial troubleshooting and found that the following file Microsoft.Bcl.Build.Tasks.dll was getting locked and it resulted in build failure:

Digging deeper we found that user was using a powershell script to run parallel builds in msbuild in v-next builds with the following inputs regarding cpuusage and parallel build enabled.

 

Solution:

-  Once we set the build in parallel parameter tofalse, the build succeeded but again the purpose of msbuild running builds in parallel was not getting achieved.

-  After further troubleshooting we identified that the following parameter in msbuild can be used to trigger parallel builds in msbuild using tfs:

/nodereuse:false

Note: Please Specify the /nodereuse:false flag (double check the flag name) to msbuild or else it will stay running and tends to leave handles open like
this. Microsoft would  be specifying this in our msbuild task that ships in upcoming versions.

Written by: Deepak Kumar Mishra, Support Engineer

Reviewed by: Nitish Nagpal, Support Escalation Engineer