Child node "2" exited prematurely

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


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.


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