maui
maui copied to clipboard
[Trimming] Enable trimming and AOT analyzers
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
@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
@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)
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.