Open Junjun-zhao opened 1 week ago
Expected behavior Launch successfully.
I don't understand why you think that was the expected behavior given all the annoucements made regarding BinaryFormatter
. This is obviously by design.
Tagging subscribers to this area: @dotnet/area-system-runtime See info in area-owners.md if you want to be subscribed.
cc @adamsitnik @bartonjs
This is by design.
1) Everyone should stop using BinaryFormatter. 2) To the extent that (1) is not possible, the application can reference the System.Runtime.Serialization.Formatters nuget package (the 9.0 version line), and that will bring BinaryFormatter back to the functionality it had in .NET 8.
The apps mentioned in this bug are real world apps sourced from GitHub and we are aware of BinaryFormatter removal. We will help redirect issue to app repos after investigation is completed by Winforms/WPF teams. cc @JeremyKuhne since he is taking a look at the failures. This bug is logged by the .NET AppCompat validation team that is confirming behavior for runtime compat scenarios and ensuring that workarounds/guidance planned for customers running into similar issues are available and work. We are also helping to get confirmation that the failures that we are seeing are expected (all potential code paths or BinaryFormatter usages identified by the representative set of apps in our lab, are fully understood).
Description
When run the 3rd party application with the latest .NET 9 build "dotnet-sdk-9.0.100-preview.7.24321.3", it failed to launch with error: System.PlatformNotSupportedException: 'BinaryFormatter serialization and deserialization have been removed. See https://aka.ms/binaryformatter for more information.'
Reproduction Steps
Minimal Repro steps (Demo attached):
Expected behavior
Launch successfully.
Actual behavior
Launch failed with error:
App Repro steps: 1.Set EnableUnsafeBinaryFormatterSerialization switch to True and set 9.0.100-preview.6.24325.8 runtime version in NetTopologySuiteTest02\NetTopologySuite.Tests.NUnit.runtimeconfig.json
Expected Result: All pass.
Actual Result: Error Message:
Regression?
Yes Verify Scenarios: 1). Windows 10 21H2 AMD64 + dotnet-sdk-9.0.100-preview.6.24314.10: Pass 2). Windows 10 21H2 AMD64 + dotnet-sdk-9.0.100-preview.7.24321.3: Fail
Known Workarounds
No. Tried the following steps:
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
Configuration
Application Name: NetTopologySuite(UnitTest) OS: Windows 10 21H2 CPU: X64 .NET Build Number: dotnet-sdk-9.0.100-preview.7.24321.3 App & Source Location checking at: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2110672 Github Link: https://github.com/mRemoteNG/mRemoteNG
Dotnet Info:
Other information
Question:
@dotnet-actwx-bot @dotnet/compat