← All recipes
Moderne licensed

Find EnumConverter constructor validation change

Recipe IDOpenRewrite.Recipes.CSharp.Migration.Dotnet.Net9.FindEnumConverterArtifactOpenRewrite.Recipes.CSharp.Migration.Dotnet

Finds new EnumConverter() constructor calls. In .NET 9, EnumConverter validates that the registered type is actually an enum and throws ArgumentException if not.

Single recipesearchdotnetnet9Proprietary

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.Net9.FindEnumConverter

If the recipe isn’t available locally, install it with:

mod config recipes nuget install OpenRewrite.Recipes.CSharp.Migration.Dotnet