-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[trimming]
TrimMode=full
in debug mode, should enable analyzers (#9320
) For NativeAOT scenarios, projects would set: <PublishAot>true</PublishAot> For both `Debug` and `Release`, this allows you to get the same set of analyzers in both configurations. You'd want to see the same warnings for both. For Android, the project template is currently doing: <PropertyGroup Condition="'$(Configuration)' == 'Release'"> <TrimMode>Full</TrimMode> </PropertyGroup> but this would result in a *different* set of warnings between `Debug` and `Release` configuration builds! Instead, we can do: <PropertyGroup> <TrimMode>Full</TrimMode> </PropertyGroup> And then add a new default, such as: <EnableTrimAnalyzer Condition=" '$(EnableTrimAnalyzer)' == '' and '$(TrimMode)' == 'full' " >true</EnableTrimAnalyzer> `$(TrimMode)=Full` does *not* enable the trimmer, so other defaults in the `Debug` configuration build should remain unchanged. So, the new behavior is: * For `$(Configuration)=Debug` projects, * `$(PublishTrimmed)=false` (default, no trimmer) * `$(TrimMode)=Full` (project template) * `$(EnableTrimAnalyzer)=true` (new default) * You get the same set of warnings in `Debug` and `Release` configuration builds. I also reworded the comment in the project template slightly, to mention it enables analyzers.
- Loading branch information
1 parent
5113600
commit 118e894
Showing
4 changed files
with
10 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters