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.
Restart Windows resolved it for me. Always worth a try for weird errors like this.
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...
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With