Find BackgroundService.ExecuteAsync behavior change
Recipe ID
OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net10.FindBackgroundServiceExecuteAsyncArtifactOpenRewrite.Recipes.CSharp.Migration.DotnetFinds methods that override ExecuteAsync from BackgroundService. In .NET 10, the entire method runs on a background thread; synchronous code before the first await no longer blocks host startup.
Single recipenet10searchdotnethostingProprietary
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.Net10.FindBackgroundServiceExecuteAsyncIf the recipe isn’t available locally, install it with:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.Migration.Dotnet