← All recipes
Moderne licensed

Find Regex.CompileToAssembly usage (SYSLIB0052)

Recipe IDOpenRewrite.Recipes.CSharp.Migration.Dotnet.Net8.FindRegexCompileToAssemblyArtifactOpenRewrite.Recipes.CSharp.Migration.Dotnet

Finds usage of Regex.CompileToAssembly() and RegexCompilationInfo. These are obsolete in .NET 8 (SYSLIB0052). Use the Regex source generator instead.

Single recipesearchregexdotnetnet8Proprietary

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.FindRegexCompileToAssembly

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

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