I am currently having a problem creating a universal Windows application using Visual Studio 2015. Whenever I try to compile my project, I get the following error:
Child node "2" exited prematurely. Shutting down. Diagnostic information may be found in files in the temporary files directory named MSBuild_*.failure.txt.
This error occurs whenever XAML files are present in the application. It doesn't matter what the files contain. In order for this error to appear, one empty XAML file with its build action set to Pageor is sufficient ApplicationDefinition.
In further details of the diagnostic logs, it seems that an error occurs in the task CompileXamlwith the following exception:
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at Microsoft.Windows.UI.Xaml.Build.Tasks.NativeMethods.WriteWithCheckSum(IStream[] xamlStreams, Int32 numFiles, String[] pbChecksum, Int32 checksumSize, IXbfMetadataProvider provider, TargetOSVersion targetVersion, UInt32 xbfGenerationFlags, IStream[] xbfStreams, Int32& errorCode, Int32& errorFileIndex, Int32& errorLine, Int32& errorColumn)
at Microsoft.Xaml.XBF.XbfGenerator.GenerateXbfFromStreams(IStream[] inputStreams, IStream[] outputStreams, UInt32 xbfGenerationFlags, String[] checksums, TargetOSVersion targetOS, Int32& errorCode, Int32& errorFile, Int32& errorLine, Int32& errorPosition)
at Microsoft.Xaml.XBF.XbfGenerator.GenerateAll(String targetPlatformVersion, UInt32 xbfGenerationFlags)
at Microsoft.Xaml.XBF.XbfGenerator.GenerateXbfFiles(String targetPlatformVersion, UInt32 xbfGenerationFlags, Boolean v80Compat)
at Microsoft.Windows.UI.Xaml.Build.Tasks.CompileXamlInternal.GenerateXbfFiles(List`1 xamlList)
at Microsoft.Windows.UI.Xaml.Build.Tasks.CompileXamlInternal.DoExecute()
at Microsoft.Windows.UI.Xaml.Build.Tasks.CompileXaml.Execute()
What could be causing this exception?
Troubleshooting steps taken to no avail:
- PC restart
- Reinstall Visual Studio and .NET framework
- VS ( )