0

I have a situation to build multiple solution using MSBUILD in multi threading, but during build, always few solution get failed. I have try to build each solution one by one , its working perfectly. but i have try to build 5 solution using multi threading, few build get failed. As I investigated the build log file of both success build and failure build, it seems MSBUILD getting conflict with each build process. For reference I have attached two text file of build log.

[Build start for submission ID 11468 ] https://i.stack.imgur.com/KbaJb.png

[Build start for submission ID 11468 ] https://i.stack.imgur.com/K1BOU.png

 using (BuildManager objBuildManager = new BuildManager())
 {
 BuildRequestData BuildRequest = new BuildRequestData(SolutionPath, GlobalProperty, "14.0", new string[]
 { "Build" }, null,
    BuildRequestDataFlags.ReplaceExistingProjectInstance);
    BuildResult buildResult = objBuildManager.Build(bp, BuildRequest)
 if (buildResult.OverallResult == BuildResultCode.Success)
 {
  buildPath = Convert.ToString(buildResult.ResultsByTarget.FirstOrDefault(x =>
x.Key == "Build").Value.Items[0]);
 }
}
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

1 Answers1

0

Have attached build log for reference.

Success build log https://github.com/Microsoft/msbuild/files/1115978/11468.success.txt

failure build log https://github.com/Microsoft/msbuild/files/1115979/11468.failed.txt