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

Report better errors when a library doesn't support AoT #9999

Open
dotMorten opened this issue Sep 19, 2024 · 2 comments
Open

Report better errors when a library doesn't support AoT #9999

dotMorten opened this issue Sep 19, 2024 · 2 comments
Labels
bug Something isn't working needs-triage Issue needs to be triaged by the area owners

Comments

@dotMorten
Copy link
Contributor

Describe the bug

This is a follow up to #9980
If you reference a library that hasn't done the work to upgrade to WinAppSDK 1.6, upgraded CSWinRT and generated the new projections, what you're met with is this obscure error on launch:
image

There's no way to identify what is causing this crash. If we could have a build error/warning when PublishAoT is enabled, or a better exception at runtime that lets us identify which dependency doesn't support AoT, so that we can contact the library authors and have them address it.

Steps to reproduce the bug

  1. Create a new WinUI3 project and enabled it for AoT
  2. Reference WinUIEx v2.4.0
  3. Run the app.
  4. Boom!

Expected behavior

No response

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.6.0: 1.6.240829007

Windows version

Windows 11 (22H2): Build 22621

Additional context

No response

@dotMorten dotMorten added the bug Something isn't working label Sep 19, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Sep 19, 2024
@Sergio0694
Copy link
Member

@manodasanW I reckon I can just reuse the logic we have in the RCW fallback generator, check that IsAotCompatible or PublishAot is set, and if so then just emit a whole bunch of warnings for all of those old types? Or perhaps one per assembly. Does that make sense? I can take this one if you think that approach makes sense 🙂

@ghost1372
Copy link
Contributor

i think this issue is related to this microsoft/WindowsAppSDK#4730
refrencing any class library which contains resources dictionary (added in app.xaml) will be crashed Even if the dictionary is empty

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

3 participants