-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed as duplicate of#12141
Description
#13175 is merged. A next possible improvement could be making MSBuild trim friendly:
--- a/src/MSBuild/MSBuild.csproj
+++ b/src/MSBuild/MSBuild.csproj
@@ -15,6 +15,8 @@
versions of this project -->
<RuntimeIdentifiers Condition="'$(DotNetBuildSourceOnly)' != 'true'">win7-x86;win7-x64</RuntimeIdentifiers>
<UseRidGraph>true</UseRidGraph>
+ <PublishTrimmed>true</PublishTrimmed>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<EnableDefaultItems>false</EnableDefaultItems>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>Repro:
$ .dotnet/dotnet publish -f net10.0 src/MSBuild/MSBuild.csproj
...
Build failed with 29 error(s) in 2.6sTwo concrete benefits of making MSBuild trim-friendly:
- Code bloat reduction in the final executable
- Paves the path for AOT compatibility (~83% of
PublishAoterrors are trimming-related)
Not pitching AOT as a main goal here, but making the codebase trimming-safe naturally moves things in that direction if/when that ever becomes interesting.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels