Skip to content

Commit

Permalink
Only enable trimming for TFMs that support it
Browse files Browse the repository at this point in the history
  • Loading branch information
jzebedee committed Sep 19, 2023
1 parent a342a9c commit 877ba52
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/LibDeflate/LibDeflate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<IsTrimmable>true</IsTrimmable>

<!-- Optional: Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
Expand All @@ -21,6 +20,12 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<!-- only enable trimming for TFMs that support it -->
<!-- see: https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/8.0/trimming-unsupported-targetframework -->
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>

<!-- Source Link Support -->
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
Expand Down

0 comments on commit 877ba52

Please sign in to comment.