Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
UltraToolbarsManager uses BinaryFormatter that is deprecated
posted

Starting in .NET 8, the affected methods throw a NotSupportedException at run time across all project types except Windows Forms and WPF. The APIs continue to remain obsolete (as error) across all project types, including Windows Forms and WPF.

Functions like: CreateRestorePoint SaveAsBinary LoadFromBinary uses BinaryFormatter and in .net8-windows i get SerializationException from System.CoreLib

Inner Exception :
Source :System.Private.CoreLib
Message :Serializing delegates is not supported on this platform.
Type :System.Runtime.Serialization.SerializationException
Stack trace : at System.MulticastDelegate.GetObjectData(SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, BinaryFormatterWriter serWriter)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph)
at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.SaveHelper(Stream stream, IFormatter formatter)

Breaking change: BinaryFormatter disabled across most project types - .NET | Microsoft Learn

learn.microsoft.com/.../system.runtime.serialization.serializationexception

Parents
No Data
Reply
  • 29085
    Offline posted

    Hello and thank you for contacting Infragistics. Please attach a sample project isolating the behavior. Are you using our Windows Forms UltraToolbarsManager in an ASP.NET project? If so and the issue doesn't happen in in WinForms this would be considered not a supported environment. 

Children