Standard-Toolkit icon indicating copy to clipboard operation
Standard-Toolkit copied to clipboard

[Bug]: BinaryFormatter is deprecated due to possible security risks and will be removed with .NET 9. If you wish to continue using it, set property "GenerateResourceWarnOnBinaryFormatterUse" to false.

Open Smurf-IV opened this issue 1 year ago • 3 comments

Severity Code Description Project File Line Warning MSB3825 Resource "imageList1.ImageStream" of type "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" is deserialized via BinaryFormatter at runtime. BinaryFormatter is deprecated due to possible security risks and will be removed with .NET 9. If you wish to continue using it, set property "GenerateResourceWarnOnBinaryFormatterUse" to false. More information: https://aka.ms/msbuild/net8-binaryformatter Ribbon Gallery 2022 Z:\GitHub\Krypton-Suite\Standard-Toolkit-Demos\Source\Krypton Ribbon Examples\Ribbon Gallery\Form1.resx 1

Smurf-IV avatar Oct 01 '23 07:10 Smurf-IV

Would this also affect the planned theme binary import feature?

PWagner1 avatar Oct 08 '23 06:10 PWagner1

the issue is opened also in the dotnet/winforms git https://github.com/dotnet/winforms/issues/9701#issuecomment-1803290602

AngeloCresta avatar Nov 14 '23 21:11 AngeloCresta

If you need to run the code in .net9 without changing the sources you can add this on the Toolkit project files <PropertyGroup> <SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage> <EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization> <NoWarn>$(NoWarn);SYSLIB0011</NoWarn> <GenerateResourceWarnOnBinaryFormatterUse>false</GenerateResourceWarnOnBinaryFormatterUse> </PropertyGroup> Angelo

AngeloCresta avatar Dec 01 '23 14:12 AngeloCresta

Remove the errant resx file, and then checked that the designer still works: image

Smurf-IV avatar May 28 '24 07:05 Smurf-IV