Migrate ApiController to ControllerBase
Recipe ID
OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net3_0.UseApiControllerBaseArtifactOpenRewrite.Recipes.CSharp.Migration.DotnetReplace ApiController base class (from the removed WebApiCompatShim) with ControllerBase and add the [ApiController] attribute. The shim was removed in ASP.NET Core 3.0.
Single recipecsharpdotnetaspnetcoremigrationProprietary
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.Net3_0.UseApiControllerBaseIf the recipe isn’t available locally, install it with:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.Migration.Dotnet