Skip to content

Commit

Permalink
Revert "Allow MSBuild to use BinaryFormatter" (#34402)
Browse files Browse the repository at this point in the history
  • Loading branch information
JanKrivanek authored Aug 14, 2023
2 parents 3e78d69 + 1f37f2f commit 6e5c962
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/Layout/redist/targets/GenerateLayout.targets
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,6 @@
<PropertyGroup>
<ReplacementPattern>"version": ".*"</ReplacementPattern>
<ReplacementString>"version": "$(MicrosoftNETCoreAppRuntimePackageVersion)"</ReplacementString>

<DisabledBinaryFormatterPattern>"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false</DisabledBinaryFormatterPattern>
<EnableBinaryFormatterString>"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": true</EnableBinaryFormatterString>
</PropertyGroup>
<ItemGroup>
<!-- Exclude F# from retargeting: https://github.com/dotnet/toolset/issues/2866 -->
Expand All @@ -468,14 +465,6 @@
ReplacementPatterns="$(ReplacementPattern)"
ReplacementStrings="$(ReplacementString)" />

<!-- Work around https://github.com/dotnet/msbuild/issues/6215 by opting back into net7 behavior -->
<ReplaceFileContents
InputFiles="@(ToolRuntimeConfigPath)"
DestinationFiles="@(ToolRuntimeConfigPath)"
ReplacementPatterns="$(DisabledBinaryFormatterPattern)"
ReplacementStrings="$(EnableBinaryFormatterString)"
Condition=" '%(ToolRuntimeConfigPath.FileName)' == 'MSBuild.runtimeconfig'" />

<Move
SourceFiles="@(MSBuild15Items)"
DestinationFiles="@(MSBuild15Items -> '$(OutputPath)/Current/%(RecursiveDir)%(Filename)%(Extension)')" />
Expand Down

0 comments on commit 6e5c962

Please sign in to comment.