Find legacy serialization constructors (SYSLIB0051)
Recipe ID
OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net8.FindSerializationConstructorsArtifactOpenRewrite.Recipes.CSharp.Migration.DotnetFinds legacy serialization constructors .ctor(SerializationInfo, StreamingContext) which are obsolete in .NET 8 (SYSLIB0051). The ISerializable pattern is no longer recommended.
Single recipeserializationsearchdotnetnet8Proprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net8.FindSerializationConstructorsIf the recipe isn’t available locally, install it with:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.Migration.Dotnet