Solved! Go to Solution.
This article seem to cover a bit half way down how to add the VCLibs as a dependency: https://learn.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-prepare
It does look like if I add the following, that it shows up in the manifest of the generated app package, but no idea if that'll do the trick:
You could at least start with confirming whether it is a vclibs issue on the machine where you can reproduce, by installing the C++ Redistributable and verify if that addresses it.
Here is the publish result: WinuiTest_1.0.4.0_Test.zip
I wonder if the machine is missing the C++ redistributable which is listed as a requirement for the .NET SDK (Visual Studio installs this too which explains why VS is fixing the crash)
You could also try and use ProcDump to get a better idea why it is crashing. I've seen weird crashes like this in WinUI, and the error does point to their module.
This article seem to cover a bit half way down how to add the VCLibs as a dependency: https://learn.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-prepare
It does look like if I add the following, that it shows up in the manifest of the generated app package, but no idea if that'll do the trick:
You could at least start with confirming whether it is a vclibs issue on the machine where you can reproduce, by installing the C++ Redistributable and verify if that addresses it.
That was it!
After installing VC redist, no crash.
By adding <WinUISDKReferences>true</WinUISDKReferences> in the csproj, 2 VCLibs packages are published :
The app now works without the need to install VC redist.
Thanks!
Great! Nice find on WinUISDKReferences property.