dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.31k stars 956 forks source link

Investigate BinaryFormatter Impact On DataSets #11366

Open lonitra opened 2 months ago

lonitra commented 2 months ago

DataSets may be impacted by BinaryFormatter. We need to investigate serialization/deserialization flow for DataSets, understand what impact BinaryFormatter might have, and determine next steps from there.

kirsan31 commented 2 months ago

Ilink to my question on this topic: https://github.com/dotnet/winforms/issues/6267#issuecomment-2003656245

eduarddejong commented 1 month ago

This is definitely important to look at, as it plays a role in the ability to port old .NET Framework desktop applications to modern .NET 8 or 9.

See the following issue (I also left a comment personally hoping for more attention to it) created on the Visual Studio Developer Community: https://developercommunity.visualstudio.com/t/MSDataSetGenerator-Generate-SYSLIB0051-w/10488377?q=BinaryFormatter

I don't know how everything internally works with the Typed DataSet designer, but parts of the generated code in the .Designer.cs file are making calls to obsolete StreamingContext constructors. I believe these code parts should not be a technical requirement for the DataSet it's actual functionality.

In fact the dataset designer is not even a direct WinForms part or even modern .NET, but a Visual Studio component probably still running in old .NET Framework. But it's the fact that it's all dependently connected to each other in this old type of VS project and that a good working VS solution is also needed to keep it all working.