← All recipes
Moderne licensed

Find Thread.Abort usage (SYSLIB0006)

Recipe IDOpenRewrite.Recipes.CSharp.Migration.Dotnet.Net6.FindThreadAbortArtifactOpenRewrite.Recipes.CSharp.Migration.Dotnet

Finds calls to Thread.Abort() which throws PlatformNotSupportedException in .NET 6+ (SYSLIB0006). Use CancellationToken for cooperative cancellation instead.

Single recipesearchdotnetnet6threadingProprietary

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.Net6.FindThreadAbort

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

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