Windows (WindowsAppSDK 1.6) with Uno MVUX/Navigation crashes when using the new Native AOT feature. #18177
Labels
difficulty/tbd
Categorizes an issue for which the difficulty level needs to be defined.
kind/bug
Something isn't working
triage/untriaged
Indicates an issue requires triaging or verification
Current behavior
I did not open the issue under a different repo due to this possibly being related to non merged WindowsAppSDK 1.6 things. Otherwise it should go to toolkit/extensions
Currently when using Native AOT that is supported by WindowsAppSDK 1.6 with the MVUX/Uno navigation it will result in a crash inside Microsoft.UI.Xaml.dll
I intentionally included a very minimal repo using a little WinUI project as base to have as less files included as possible regarding that issue.
WinUI_MVUX_Nav_NAOT_Repo.zip
Expected behavior
It should not crash when navigating.
How to reproduce it (as minimally and precisely as possible)
The repo already includes a ready to use project that sets PublishAot to true for all builds. Means just launching it should result in the crash.
Workaround
Set PublishAot to false
Works on UWP/WinUI
Yes
Environment
No response
NuGet package version(s)
No response
Affected platforms
Windows (WinAppSDK)
IDE
Visual Studio 2022
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
I did not dig in too much into that because I am not sure if that is caused by the latest SDK not being merged into Uni yet.
I only know it happens when navigating and when the call
var services = await window.AttachServicesAsync(host.Services);
inServiceProviderExtensions.BuildAndInitializeHostAsync
happens.The text was updated successfully, but these errors were encountered: