There should be a bug in DotNetNativeToolChain. In project_name.UWP.csproj file, I have
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
In xaml, I have
<Image x:Name="testimage"></Image>
In code behind file, I have
testimage.Source = ImageSource.FromResource("project_name.testimage1.png");
testimage1.png is entered into project_name.csproj as
<EmbeddedResource Include="testimage1.png" />
Project can compile but crash with an error "Unhandled exception at 0x(Windows.UI.Xaml.dll) in .exe. 0xC000027B: An application-internal exception has occurred."
If I comment out the "UseDotNetNativeToolchain" in project_name.UWP.csproj file, the application runs smoothly.