Use Environment.ProcessId

Proprietary

Replace Process.GetCurrentProcess().Id with Environment.ProcessId (CA1837). Available since .NET 6.

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

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