← All recipes
Moderne licensed

Find UseMvc/AddMvc usage (replaced in ASP.NET Core 3.0)

Recipe IDOpenRewrite.Recipes.CSharp.Migration.Dotnet.Net3_0.FindUseMvcArtifactOpenRewrite.Recipes.CSharp.Migration.Dotnet

Finds usages of app.UseMvc(), app.UseMvcWithDefaultRoute(), and services.AddMvc() which should be migrated to endpoint routing and more specific service registration in ASP.NET Core 3.0.

Single recipenet3.0searchdotnetaspnetcoreProprietary

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.FindUseMvc

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

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