Migrate to ASP.NET Core 2.0
Recipe ID
OpenRewrite.Recipes.CSharp.Migration.Dotnet.AspNetCore2.UpgradeToAspNetCore20ArtifactOpenRewrite.Recipes.CSharp.Migration.DotnetMigrate ASP.NET Core 1.x projects to ASP.NET Core 2.0, applying authentication and Identity changes. See https://learn.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/identity-2x.
Composite recipecsharpaspnetcoremigrationProprietary
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.AspNetCore2.UpgradeToAspNetCore20If the recipe isn’t available locally, install it with:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.Migration.DotnetDefinition
This recipe runs the following recipes in order.
- Replace UseIdentity() with UseAuthentication()
OpenRewrite.Recipes.CSharp.Migration.Dotnet.AspNetCore2.UseUseAuthentication - Use HttpContext authentication extensions
OpenRewrite.Recipes.CSharp.Migration.Dotnet.AspNetCore2.UseHttpContextAuthExtensions - Use GetExternalAuthenticationSchemesAsync()
OpenRewrite.Recipes.CSharp.Migration.Dotnet.AspNetCore2.UseGetExternalAuthenticationSchemesAsync - Change type
OpenRewrite.Recipes.CSharp.Migration.Dotnet.ChangeType - Change type
OpenRewrite.Recipes.CSharp.Migration.Dotnet.ChangeType - Find IAuthenticationManager usage
OpenRewrite.Recipes.CSharp.Migration.Dotnet.AspNetCore2.FindIAuthenticationManager - Change type
OpenRewrite.Recipes.CSharp.Migration.Dotnet.ChangeType