Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Child node "2" exited prematurely

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.

like image 663
Darthg8r Avatar asked Jan 20 '16 16:01

Darthg8r


3 Answers

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

like image 156
Jim W says reinstate Monica Avatar answered Nov 18 '22 03:11

Jim W says reinstate Monica


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...

like image 30
Darthg8r Avatar answered Nov 18 '22 05:11

Darthg8r


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.

like image 20
Popa Andrei Avatar answered Nov 18 '22 03:11

Popa Andrei