Skip to content

Commit d373384

Browse files
authored
Treat usage of BinaryFormatter as error (#15081)
1 parent d235c0a commit d373384

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/FSharp.Build/Microsoft.FSharp.NetSdk.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
4545
<ReflectionFree Condition=" '$(ReflectionFree)' == '' ">false</ReflectionFree>
4646
</PropertyGroup>
4747

48+
<!-- BinaryFormatter is disabled (warning is treated as error) by default in .NET8+, this mirroring the change in SDK (https://github.com/dotnet/sdk/pull/31591) -->
49+
<PropertyGroup>
50+
<WarningsAsErrors Condition="'$(_BinaryFormatterObsoleteAsError)' == 'true'">$(WarningsAsErrors);SYSLIB0011</WarningsAsErrors>
51+
</PropertyGroup>
52+
4853
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
4954
<DebugSymbols Condition="'$(DebugSymbols)' == '' ">true</DebugSymbols>
5055
<Optimize Condition="'$(Optimize)' == '' ">false</Optimize>

0 commit comments

Comments
 (0)