Find X509Certificate2.PrivateKey usage (SYSLIB0028)

Proprietary

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

OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net6.FindX509PrivateKey
mod run . --recipe=OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net6.FindX509PrivateKey

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.