← All recipes
Moderne licensed

Find X509Certificate2.PrivateKey usage (SYSLIB0028)

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

Finds usages of X509Certificate2.PrivateKey which is obsolete (SYSLIB0028). Use GetRSAPrivateKey(), GetECDsaPrivateKey(), or the appropriate algorithm-specific method instead.

Single recipesearchdotnetcryptographynet6Proprietary

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

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

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