Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows (WindowsAppSDK 1.6) with Uno MVUX/Navigation crashes when using the new Native AOT feature. #18177

Open
Fabi opened this issue Sep 10, 2024 · 0 comments
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

Comments

@Fabi
Copy link

Fabi commented Sep 10, 2024

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); in ServiceProviderExtensions.BuildAndInitializeHostAsync happens.

@Fabi Fabi added 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 labels Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant