Latest Release (May 2023)
Full list of changes in this release
Key | Category | Summary |
---|---|---|
ANNOTATIONNET-2073 | Enhancement | Remove BinaryFormatter usage for annotations serialization |
Major Features
Remove BinaryFormatter usage for annotations serialization
Serialize and Deserialize methods on BinaryFormatter, Formatter, and IFormatter have been obsolete since .NET 5. Additionally, BinaryFormatter serialization is now prohibited by default for ASP.NET apps.
Due to security vulnerabilities in BinaryFormatter, the following methods are now obsolete and produce a compile-time warning. Additionally, in ASP.NET Core 5.0 and later apps, they will throw a NotSupportedException, unless the web app has re-enabled BinaryFormatter functionality. In .NET 7, the affected APIs will be obsolete as error.
For the reasons listed above, and in order to support .NET 7 and later versions in the future, we had to rework our algorithm for serialization. As you know, we use serialization to save different versions of an annotated document. Since 23.5 we use XmlSerializtion instead of the old BinarySerialization