I have a sideload AppXBundle UWP app but I need call another app from UWP so I have Windows Application Packaging Project where is my UWP app set as entry point. Everything worked well, but after some time when the application worked without changes, so We tried to install this application on a new Windows build and now after start We get this error:
Faulting application name: SampleApp.UWP.exe, Version: 1.0.0.0, Timestamp: 0x601d0acc
Faulting module name: Windows.UI.Xaml.dll, version: 10.0.19041.1151, timestamp: 0x4a600fea
Exception code: 0xc000027b
Fault offset: 0x008350e1
Faulting process id: 0x32ac
Faulting application start time: 0x01d7bb437797a43a
Faulting application path: C:\Users\user\source\repos\SampleApp\src\SampleApp.Package\bin\x86\Debug\AppX\SampleApp.UWP.exe
Faulting module path: C:\Windows\System32\Windows.UI.Xaml.dll
Report Id: d3fe4cda-8453-44a7-9584-a4e75a4b625b
Faulting package full name: 32ccd31a-20e9-4379-92c7-3cb29f6d9364_1.0.0.0_x86__m1eq83gekd84y
Faulting package-relative application ID: App
I tried deploy or install sideload only UWP app project and it works but when deploy or install package project it crash after start. It all worked well I think on Windows 10 version 1903 build 18362 but now I have Windows 10 version 20H2 build 19042.1237 and it does not work.
Windows Application Packaging Project and UWP app target has been set (when it works):
Now I tried:
but still same problem...
When I creating App Packages in configuration I have architecture x86 Debug(x96) only.
I have sample project for reproduce this problem HERE. When deploy or Publish -> Create App Packages in SampeApp.Package project it crash after start but when I deploy or publish only SampleApp.UWP project it works.
I found a solution HERE by adding UseAppLocalCoreFramework in .csproj PropertyGroups.
<UseAppLocalCoreFramework>true</UseAppLocalCoreFramework>
or adding ResolvePackageDependenciesForBuild to the end of the .wapproj (packaging project file).
<Target Name="ResolvePackageDependenciesForBuild" />