Skip to content

Commit f40b07a

Browse files
tmdsgithub-actions
authored andcommitted
Disable binary formatter tests when DotNetBuildSourceOnly. (#107549)
1 parent 08e59d9 commit f40b07a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,8 @@
473473
<PropertyGroup Condition="'$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true' or '$(IsTrimmingTestProject)' == 'true'">
474474
<!-- we need to re-enable BinaryFormatter within test projects since some tests exercise these code paths to ensure compat -->
475475
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
476+
<!-- For DotNetBuildSourceOnly, only the bundled BinaryFormatter is built which does not support serialization. -->
477+
<EnableUnsafeBinaryFormatterSerialization Condition="'$(DotNetBuildSourceOnly)' == 'true'">false</EnableUnsafeBinaryFormatterSerialization>
476478
<!-- don't warn on usage of BinaryFormatter or legacy serialization infrastructure from test projects -->
477479
<NoWarn>$(NoWarn);SYSLIB0011;SYSLIB0050;SYSLIB0051</NoWarn>
478480
<!-- don't warn about unnecessary trim warning suppressions. can be removed with preview 6. -->

0 commit comments

Comments
 (0)