maui icon indicating copy to clipboard operation
maui copied to clipboard

[Trimming] Enable trimming and AOT analyzers

Open simonrozsival opened this issue 1 year ago • 1 comments
trafficstars

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 avatar Mar 28 '24 16:03 simonrozsival

@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:

  • https://github.com/dotnet/maui/issues/21750

jonathanpeppers avatar Apr 11 '24 20:04 jonathanpeppers

@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 https://github.com/dotnet/maui/pull/21797, does this PR need to change at all? (I think the change in https://github.com/dotnet/maui/pull/21797 is good, but I want to test locally first)

Eilon avatar Apr 15 '24 17:04 Eilon

This PR doesn't need to change if https://github.com/dotnet/maui/pull/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.

jonathanpeppers avatar Apr 15 '24 17:04 jonathanpeppers