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

[Trimming] Enable trimming and AOT analyzers #21505

Merged
merged 5 commits into from
Apr 15, 2024

Conversation

simonrozsival
Copy link
Member

Description of Change

This PR enables trimming, AOT, and single file analyzers to assemblies where it doesn't require any changes. For Essentials.csproj and Compatibility.csproj I changed IsTrimmable to IsAotCompatible.

The only projects that don't have the analyzers enabled yet are:

  • Controls.Core.csproj - will need addressing a few issues
  • Controls.Xaml.csproj - will need addressing a few issues

I'm also skipping adding analyzers to:

  • Test projects
  • Compatibility projects
  • ControlGallery projects
  • *.Design projects (net472)
  • Templates
  • netstandard2.0 projects

Issues Fixed

Contributes to #18658

@simonrozsival simonrozsival marked this pull request as ready for review April 8, 2024 12:04
@simonrozsival simonrozsival requested review from a team as code owners April 8, 2024 12:04
@jonathanpeppers
Copy link
Member

@Eilon or someone in @dotnet/dotnet-maui-blazor-eng care to review?

This ignores a trimmer warning in WinForms/WPF BlazorWebView, but we filed an issue for the future at:

@Eilon
Copy link
Member

Eilon commented Apr 15, 2024

@Eilon or someone in @dotnet/dotnet-maui-blazor-eng care to review?

This ignores a trimmer warning in WinForms/WPF BlazorWebView, but we filed an issue for the future at:

I'm reviewing. If we take the change in #21797, does this PR need to change at all? (I think the change in #21797 is good, but I want to test locally first)

@jonathanpeppers
Copy link
Member

This PR doesn't need to change if #21797 goes in.

The warning suppressed here is around Assembly.Location that returns null in self-contained apps. But the code already does a null check.

@rmarinho rmarinho merged commit 59e0096 into dotnet:net9.0 Apr 15, 2024
47 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants