2

We are seeing intermittent break with with our automated build system. The error is with MSBuild child nodes and there doesn't appear to be any logging or error information. The error can happen randomly on any node and at different points in the build. And, I haven't been able to reproduce the issue by running the building on the command line.

 0>MSBUILD : error MSB4166: Child node "8" exited prematurely. Shutting down.
Diagnostic information may be found in files in "C:\Users\<user>\AppData\Local\Temp\"
and will be named MSBuild_*.failure.txt. This location can be changed by setting
the MSBUILDDEBUGPATH environment variable to a different directory.  

The expected log file MSBuild_*.failure.txt doesn't exist and there isn't any information in the console output that would indicate what is causing the failure. We are using "Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework" and Jenkins 2.151.3

LoLance
  • 25,666
  • 1
  • 39
  • 73
Scott M.
  • 23
  • 1
  • 4
  • What the result if add /nodeReuse:false in the msbuild command when executing the command by jenkins. Have a look at [this issue](https://stackoverflow.com/questions/7916687/error-msb4166-child-node-exited-prematurely-shutting-down), check if disabling the reuse feature helps. A feedback would be expected. – LoLance Mar 11 '19 at 05:54
  • Any update? What the result if you use command like this: msbuild.exe xxx\ConsoleApp44.csproj /nodeReuse:false – LoLance Mar 13 '19 at 09:55
  • Added /nodeReuse:false to the msbuild command line and it appears to have resolved the issue. Thanks for the help. – Scott M. Mar 15 '19 at 14:22
  • Hi Scott, If my reply is helpful for your issue, could you please mark it as answer. This can be beneficial to other community members easier to search the solution. Thanks! – LoLance Mar 25 '19 at 05:20

1 Answers1

7

This issue seems to always occur in CI server while works well in local machine by msbuild.

Not sure the cause of it, but add the /nodeReuse:false to the msbuild command can help fix this issue.

You can have a look at [this similar one].(error MSB4166: Child node exited prematurely. Shutting down).

LoLance
  • 25,666
  • 1
  • 39
  • 73