Skip to content

Commit

Permalink
System.Runtime.Serialization.Formatters: fix target framework check f…
Browse files Browse the repository at this point in the history
…or source-build. (#104735)

* System.Runtime.Serialization.Formatters: fix target framework check for source-build.

The inbox implementation should no longer include a working binary formatter.

The check used to build a working formatter was '$(TargetFramework)' == '$(NetCoreAppMinimum)'.

Because NetCoreAppMinimum gets set to TargetFramework in the source-build configuration,
the source-build configuration unintentionally included a working binary formatter.

* Don't build the net8.0 target when DotNetBuildSourceOnly.

* Join lines.
  • Loading branch information
tmds authored Jul 12, 2024
1 parent 42b2b19 commit 9b09bcf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PropertyGroup>
<NoWarn>$(NoWarn);CA1822;IDE0060</NoWarn>

<FunctioningBinaryFormatter Condition="'$(TargetFramework)' == '$(NetCoreAppMinimum)'">true</FunctioningBinaryFormatter>
<FunctioningBinaryFormatter Condition="'$(TargetFramework)' == '$(NetCoreAppMinimum)' and '$(DotNetBuildSourceOnly)' != 'true'">true</FunctioningBinaryFormatter>
<!-- The GenerateNuspec target fails if this property is keyed off of FunctioningBinaryFormatter, so keep it logically in sync -->
<IncludeBuildOutput Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">false</IncludeBuildOutput>
<SuppressDependenciesWhenPacking Condition="'$(FunctioningBinaryFormatter)' != 'true'">true</SuppressDependenciesWhenPacking>
Expand Down

0 comments on commit 9b09bcf

Please sign in to comment.