Skip to content

Commit 2898a2b

Browse files
committed
Move EnableUnsafeBinaryFormatterSerialization to global props
+ fix issue of wrong condition in global props
1 parent 301cdfa commit 2898a2b

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Directory.Build.props

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,13 @@
3939

4040
<!-- Disable "BinaryFormatter is obsolete" warnings for test projects -->
4141
<NoWarn Condition="$(MSBuildProjectName.Contains('Tests')) == 'true'">$(NoWarn);SYSLIB0011</NoWarn>
42+
<!-- Enable Usage of BinaryFormatter in test projects -->
43+
<EnableUnsafeBinaryFormatterSerialization
44+
Condition="'$(TargetFramework)'=='net8.0' AND $(MSBuildProjectName.Contains('Tests')) == 'true'">true</EnableUnsafeBinaryFormatterSerialization>
4245
</PropertyGroup>
4346

4447
<!-- Debug-NET8, Release-NET8 are mostly for development convenience -->
45-
<PropertyGroup Condition = "$(Configuration.Contains('NET7')) == 'true'">
48+
<PropertyGroup Condition = "$(Configuration.Contains('NET8')) == 'true'">
4649
<!-- hard binding to net8, no property and env variable allowed-->
4750
<TargetFrameworks>net8.0</TargetFrameworks>
4851
</PropertyGroup>

Orm/Xtensive.Orm.Tests/Xtensive.Orm.Tests.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<AssemblyOriginatorKeyFile>$(OrmKeyFile)</AssemblyOriginatorKeyFile>
1111
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1212
<WarningLevel>2</WarningLevel>
13-
<EnableUnsafeBinaryFormatterSerialization Condition="'$(TargetFramework)'=='net8.0'">true</EnableUnsafeBinaryFormatterSerialization>
1413
</PropertyGroup>
1514
<Import Project="$(SolutionDir)MSBuild\DataObjects.Net.InternalBuild.targets" />
1615
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">

0 commit comments

Comments
 (0)