Skip to content

Commit 26d483c

Browse files
eng: suppress NETSDK1212 warnings by conditioning IsTrimmable on net6.0+
The <IsTrimmable> property is only meaningful for net6.0+ TFMs; applying it unconditionally to netstandard2.0 targets produces NETSDK1212 build warnings in every CI run. Add an MSBuild condition so IsTrimmable is only set when the target framework is compatible with net6.0. Affected projects: FSharp.Data.Csv.Core, FSharp.Data.Html.Core, FSharp.Data.Http, FSharp.Data.Json.Core, FSharp.Data.Runtime.Utilities, FSharp.Data.WorldBank.Core, FSharp.Data.Xml.Core Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a615f06 commit 26d483c

7 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/FSharp.Data.Csv.Core/FSharp.Data.Csv.Core.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<PackageIcon>logo.png</PackageIcon>
1010
<!-- always have tailcalls on for design time compiler add-in to allow repo to compile in DEBUG, see https://github.com/fsprojects/FSharp.Data/issues/1410 -->
1111
<Tailcalls>true</Tailcalls>
12-
<IsTrimmable>true</IsTrimmable>
12+
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>
1313
</PropertyGroup>
1414
<ItemGroup>
1515
<Compile Include="CsvRuntime.fs" />

src/FSharp.Data.Html.Core/FSharp.Data.Html.Core.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<PackageIcon>logo.png</PackageIcon>
1010
<!-- always have tailcalls on for design time compiler add-in to allow repo to compile in DEBUG, see https://github.com/fsprojects/FSharp.Data/issues/1410 -->
1111
<Tailcalls>true</Tailcalls>
12-
<IsTrimmable>true</IsTrimmable>
12+
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>
1313
<DefineConstants>$(DefineConstants);HIDE_REPRESENTATION</DefineConstants>
1414
</PropertyGroup>
1515
<ItemGroup>

src/FSharp.Data.Http/FSharp.Data.Http.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<PackageIcon>logo.png</PackageIcon>
1010
<!-- always have tailcalls on for design time compiler add-in to allow repo to compile in DEBUG, see https://github.com/fsprojects/FSharp.Data/issues/1410 -->
1111
<Tailcalls>true</Tailcalls>
12-
<IsTrimmable>true</IsTrimmable>
12+
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>
1313
</PropertyGroup>
1414
<ItemGroup>
1515
<Compile Include="Http.fs" />

src/FSharp.Data.Json.Core/FSharp.Data.Json.Core.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<PackageIcon>logo.png</PackageIcon>
1010
<!-- always have tailcalls on for design time compiler add-in to allow repo to compile in DEBUG, see https://github.com/fsprojects/FSharp.Data/issues/1410 -->
1111
<Tailcalls>true</Tailcalls>
12-
<IsTrimmable>true</IsTrimmable>
12+
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>
1313
</PropertyGroup>
1414
<ItemGroup>
1515
<Compile Include="JsonValue.fs" />

src/FSharp.Data.Runtime.Utilities/FSharp.Data.Runtime.Utilities.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<PackageIcon>logo.png</PackageIcon>
1010
<!-- always have tailcalls on for design time compiler add-in to allow repo to compile in DEBUG, see https://github.com/fsprojects/FSharp.Data/issues/1410 -->
1111
<Tailcalls>true</Tailcalls>
12-
<IsTrimmable>true</IsTrimmable>
12+
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>
1313
</PropertyGroup>
1414
<ItemGroup>
1515
<Compile Include="PublicApi.fs" />

src/FSharp.Data.WorldBank.Core/FSharp.Data.WorldBank.Core.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<PackageIcon>logo.png</PackageIcon>
1010
<!-- always have tailcalls on for design time compiler add-in to allow repo to compile in DEBUG, see https://github.com/fsprojects/FSharp.Data/issues/1410 -->
1111
<Tailcalls>true</Tailcalls>
12-
<IsTrimmable>true</IsTrimmable>
12+
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>
1313
</PropertyGroup>
1414
<ItemGroup>
1515
<Compile Include="WorldBankRuntime.fs" />

src/FSharp.Data.Xml.Core/FSharp.Data.Xml.Core.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<PackageIcon>logo.png</PackageIcon>
1010
<!-- always have tailcalls on for design time compiler add-in to allow repo to compile in DEBUG, see https://github.com/fsprojects/FSharp.Data/issues/1410 -->
1111
<Tailcalls>true</Tailcalls>
12-
<IsTrimmable>true</IsTrimmable>
12+
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>
1313
</PropertyGroup>
1414
<ItemGroup>
1515
<Compile Include="XmlRuntime.fs" />

0 commit comments

Comments
 (0)