Child node "2" exited prematurely
Asked Answered
I

11

18

I recently retargeted my Windows 8.1 app to Windows 10. I'm getting this error when building the UI projects,

"MSBUILD : error MSB4166: Child node "2" exited prematurely. Shutting down. Diagnostic information may be found in files in the temporary files directory named MSBuild_*.failure.txt."

That's not particularly useful, so I went to %temp% looking for said failure log, and it doesn't exist. Am I looking in the wrong "temp" directory?

What causes this error? I can build my supporting library project without this error.

Incidence answered 20/1, 2016 at 16:51 Comment(0)
I
5

So, I worked through this manually. I ended up creating a new project and moving source files over piece by piece. After moving something, checking the project to make sure it still built.

It turns out that this line existed in my App.xaml that blew it up:

<ResourceDictionary Source="Assets/Resources/LayoutTemplates.xaml" p8:Name="LayoutTemplates" xmlns:p8="http://schemas.microsoft.com/winfx/2006/xaml" />

Removing the namespace and "Name" attribute fixed the problem.

Pretty obscure huh...

Incidence answered 22/1, 2016 at 13:51 Comment(1)
In my case, I just change the MSBuild Platform from "Auto" do "X86" and works.Margarettamargarette
B
6

Restart Windows resolved it for me. Always worth a try for weird errors like this.

Barnabe answered 11/2, 2017 at 0:52 Comment(1)
Eff me I can't believe that fixed it after trying a lot of stuff. Restarting VS didn't help.Judicious
I
5

So, I worked through this manually. I ended up creating a new project and moving source files over piece by piece. After moving something, checking the project to make sure it still built.

It turns out that this line existed in my App.xaml that blew it up:

<ResourceDictionary Source="Assets/Resources/LayoutTemplates.xaml" p8:Name="LayoutTemplates" xmlns:p8="http://schemas.microsoft.com/winfx/2006/xaml" />

Removing the namespace and "Name" attribute fixed the problem.

Pretty obscure huh...

Incidence answered 22/1, 2016 at 13:51 Comment(1)
In my case, I just change the MSBuild Platform from "Auto" do "X86" and works.Margarettamargarette
G
2

I repaired the .net framework (control panel -> programs and features.. -> repair) because my assumption was that a dll required for MSBuild is broken. It is working now but I don't know if this is happen randomly or it's all fine.

Greenling answered 25/11, 2016 at 10:8 Comment(0)
P
1

In my case, changing Target version in UWP Project Settings, Application tab to the latest (Windows 11 in my case) fixed the problem.

Pelerine answered 13/5, 2022 at 19:12 Comment(1)
In my case I changed to the next version of the UWP SDK and it just pointed out a programming error: a "using" import for something that wasn't even being used. I believe that pointing out the SDK version also points out the compiler to be used, and therefore the more recent the version, the better and with fewer errors the compiler will be. Remembering that the UWP has always been a box of cats where "generic error" always appears, without much detail for a lot of things. Only recently has it begun to be clearer and more complete. Then it died!Insurgency
V
0

I started getting these errors in our C++ project since exactly 11 nov 2016. Checking the windows-updates, it installed the following microsoft updates for windows 10 in the morning:

Update for Windows 10 Version 1511 for x64-based Systems (KB3150513)
https://support.microsoft.com/en-us/kb/3150513

Windows Malicious Software Removal Tool for Windows 8, 8.1, 10 and Windows Server 2012, 2012 R2, 2016 x64 Edition - November 2016 (KB890830)
https://support.microsoft.com/en-us/kb/890830

Cumulative Update for Windows 10 Version 1511 for x64-based Systems (KB3198586)
https://support.microsoft.com/en-us/kb/3198586

Security Update for Adobe Flash Player for Windows 10 Version 1511 (for x64-based Systems) (KB3202790)
https://support.microsoft.com/en-us/kb/3202790

Security Update for Adobe Flash Player for Windows 10 Version 1511 (for x64-based Systems) (KB3201860)
https://support.microsoft.com/en-us/kb/3201860

Disabling multiprocessor compilation /MP (in the project-settings, under C/C++, General) seems to avoid the issue.

For the record: Happened when using incredibuild 7.22. Didn't test if it also occurs without incredibuild.

Vicarial answered 14/11, 2016 at 9:43 Comment(3)
I'm an IncrediBuild employee and as far as we know there are no complaints from other customers regarding this issue happening with IncrediBuild 7.22, we'd appreciate if you could contact [email protected] if this problem seems to be related specifically to IncrediBuild so we can examine this and post a proper answer in this thread.Addict
Hi @Dori,I have the same problem using incredibuild 7.22 but only since updating to Visual Studio 2015 Update 3. Not sure if it is a problem with incredibuild or msbuild. Anyways, I created a ticket: xoreax.helpserve.com/Default/Tickets/Ticket/View/JJC-327-23799Yapon
It happens to me with Incredibuild 7.3 (build 1795). I believe the error is caused by a race condition where something expected wasn't ready. This is a large project and my guess is it's happening in the preprocessor. Usually after about 3 or 4 retries it will eventually complete.Phraseology
F
0

For me the error appeared after setting up my build environment on a Windows Server 2012 R2.

I was running multiple MSBuild instances in parallel in the same workspace. Running MSBuild instances sequentially or in different workspaces made the problem go away.

Given other answers, my take is the error message is "something went horribly wrong and crashed violently". MSBuild robustness bug if you ask me.

Freefloating answered 8/1, 2020 at 9:27 Comment(0)
J
0

In my case it was SlowCheetah, where I set default transform for all "Content" items:

<Content>
  <TransformOnBuild>true</TransformOnBuild>
  <Link></Link>
  <CopyToOutputDirectory></CopyToOutputDirectory>
</Content>

That caused the build to take more and more memory (like 1,7GB) and eventually throw the "child node" message. After restarting windows, my VS 2019 simply closed instead of getting the error on every build. Setting content transform to false solved the problem.

Jaquez answered 25/2, 2020 at 0:18 Comment(0)
S
0

I got the same error. In my case the MSBuild failure.txt file was present, and listed this error:

System.IO.FileLoadException: Could not load file or assembly 'System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

After trying some of the above options, I stumbled across a bad installation of the Npgsql assemblies into the GAC. Uninstalling Npgsql seems to have fixed the issue. So if none of the above options help, maybe check out anything recently installed into the GAC.

Supplejack answered 16/2, 2021 at 14:31 Comment(0)
E
0

In my case restarting VS 2019 solved the issue.

Elisabetta answered 30/3, 2021 at 7:24 Comment(0)
G
0

For me the problem was that I added a reference to a .NET Framework library. I didn't get any diagnostic information in the log file it listed and VS would crash on build. Removing that reference made everything work again.

Greenbrier answered 18/7, 2023 at 17:29 Comment(0)
B
-1

Clearing the Temporary asp .net files worked for this issue: Path : C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files

Besprinkle answered 27/10, 2023 at 10:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.