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] Improve AOT compatibility on Windows #25476

Merged
merged 4 commits into from
Oct 29, 2024

Conversation

simonrozsival
Copy link
Member

Description of Change

  • We had several places where we suppressed the IL2059 on Windows. This isn't needed anymore because the generated code in XamlTypeInfo.g.cs is trim safe.
  • We don't need .rsp files as a workaround anymore. The bug in the XamlPreCompile step has been fixed in WinUI.
  • We were using AOT-incompatible Marshal.SizeOf(typeof(T)). This can be easily fixed by using the generic overload.
  • We were using trim-incompatible JSON serialization. This can be easily replaced with source-generated JSON serialization.
  • We need to make quite a few classes partial to make the CsWinRT com-wrappers source generator happy.
  • We need to allow unsafe blocks because the CsWinRT source generator produces unsafe code.

This is a follow-up to #24266, cc @Foda

@rmarinho rmarinho merged commit 769bb21 into main Oct 29, 2024
107 checks passed
@rmarinho rmarinho deleted the dev/simonrozsival/improve-aot-compatibility-on-windows branch October 29, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants