← All recipes
Moderne licensed

Find CurrentCulture/CurrentUICulture async flow change

Recipe IDOpenRewrite.Recipes.CSharp.Migration.Dotnet.NetFramework.FindAsyncCurrentCultureFlowArtifactOpenRewrite.Recipes.CSharp.Migration.Dotnet

Finds uses of CurrentCulture/CurrentUICulture, which flow across async tasks (via ExecutionContext) when retargeting to .NET Framework 4.6 (Switch.System.Globalization.NoAsyncCurrentCulture to revert). Review code that sets the culture and relies on it NOT propagating to async continuations.

Single recipesearchdotnetnet-frameworkglobalizationProprietary

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.NetFramework.FindAsyncCurrentCultureFlow

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

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