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

Broken ContentDialog style with AOT and .NET 9 #10215

Open
ubuntuegor opened this issue Dec 5, 2024 · 0 comments
Open

Broken ContentDialog style with AOT and .NET 9 #10215

ubuntuegor opened this issue Dec 5, 2024 · 0 comments
Labels
bug Something isn't working needs-triage Issue needs to be triaged by the area owners

Comments

@ubuntuegor
Copy link

Describe the bug

Correct style is not applied to ContentDialog when publishing an app with AOT and .NET 9.

Steps to reproduce the bug

  1. Create a blank WinUI 3 app in Visual Studio.
  2. Set TargetFramework to net9.0-windows10.0.19041.0 in .csproj
  3. Add <PublishAot>true</PublishAot> to .csproj
  4. Create a dialog:
await new ContentDialog
{
    XamlRoot = this.Content.XamlRoot,
    Style = Application.Current.Resources["DefaultContentDialogStyle"] as Style,
    Title = "Hello",
    CloseButtonText = "Close",
}.ShowAsync();
  1. Publish the app in Release mode using Create App Packages in Visual Studio.

Expected behavior

Properly styled dialog:
Image

Screenshots

Image

NuGet package version

WinUI 3 - Windows App SDK 1.6.3: 1.6.241114003

Windows version

Windows 11 (24H2): Build 26100

Additional context

No response

@ubuntuegor ubuntuegor added the bug Something isn't working label Dec 5, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Issue needs to be triaged by the area owners
Projects
None yet
Development

No branches or pull requests

1 participant