dotnet / winforms

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

BinaryFormatter error when clicking "Add Tab" command for TabControl in DemoConsole application #11607

Open Philip-Wang01 opened 5 days ago

Philip-Wang01 commented 5 days ago

.NET version

.NET 9.0: Main branch of WinForms repo (.NET 9.0.0-preview.7.24326.3)

Did it work in .NET Framework?

Yes

Did it work in any of the earlier releases of .NET Core or .NET 5+?

Yes, this is a regression issue. Not repro on .NET 9.0.0-preview.6.24305.2

Issue description

In DemoConsole test app of Winforms repo, BinaryFormatter error when clicking "Add Tab" command for TabControl.

image

https://github.com/dotnet/winforms/assets/86937911/f86da6ba-fee0-452b-bb45-ca4cdb663f3f

Steps to reproduce

Test sample: DemoConsole in Winforms repo

More Info:

This issue also reproduces on ImageList when clicking the "Add" command. image

elachlan commented 3 days ago

Related to #9428 and #6267

We had similar issues when BinaryFormatter was marked as obsolete #9416

LeafShi1 commented 16 hours ago

This issue appears after PR #11540