Migrate to .NET Core 3.0
Recipe ID
OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net3_0.UpgradeToDotNet3_0ArtifactOpenRewrite.Recipes.CSharp.Migration.DotnetMigrate C# projects from .NET Core 2.x to .NET Core 3.0, applying necessary API changes for removed and replaced types. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/3.0.
Composite recipecsharpdotnetmigrationProprietary
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.UpgradeToDotNet3_0If 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.
- Change .NET target framework
OpenRewrite.CSharp.Recipes.ChangeDotNetTargetFramework - Change .NET target framework
OpenRewrite.CSharp.Recipes.ChangeDotNetTargetFramework - Change .NET target framework
OpenRewrite.CSharp.Recipes.ChangeDotNetTargetFramework - Change .NET target framework
OpenRewrite.CSharp.Recipes.ChangeDotNetTargetFramework - Change .NET target framework
OpenRewrite.CSharp.Recipes.ChangeDotNetTargetFramework - Upgrade NuGet package version
OpenRewrite.CSharp.Recipes.UpgradeNuGetPackageVersion - Upgrade NuGet package version
OpenRewrite.CSharp.Recipes.UpgradeNuGetPackageVersion - Upgrade NuGet package version
OpenRewrite.CSharp.Recipes.UpgradeNuGetPackageVersion - Upgrade NuGet package version
OpenRewrite.CSharp.Recipes.UpgradeNuGetPackageVersion - Upgrade NuGet package version
OpenRewrite.CSharp.Recipes.UpgradeNuGetPackageVersion - Change type
OpenRewrite.Recipes.CSharp.Migration.Dotnet.ChangeType - Change type
OpenRewrite.Recipes.CSharp.Migration.Dotnet.ChangeType - Change type
OpenRewrite.Recipes.CSharp.Migration.Dotnet.ChangeType - Change type
OpenRewrite.Recipes.CSharp.Migration.Dotnet.ChangeType - Change type
OpenRewrite.Recipes.CSharp.Migration.Dotnet.ChangeType - Change type
OpenRewrite.Recipes.CSharp.Migration.Dotnet.ChangeType - Remove NuGet package reference
OpenRewrite.CSharp.Recipes.RemoveNuGetPackageReference - Remove NuGet package reference
OpenRewrite.CSharp.Recipes.RemoveNuGetPackageReference - Remove NuGet package reference
OpenRewrite.CSharp.Recipes.RemoveNuGetPackageReference - Add framework reference
OpenRewrite.CSharp.Recipes.AddFrameworkReference - Add NuGet package reference when namespace is used
OpenRewrite.Recipes.CSharp.Migration.Dotnet.AddNuGetPackageReferenceIfTypeUsed - Add NuGet package reference when namespace is used
OpenRewrite.Recipes.CSharp.Migration.Dotnet.AddNuGetPackageReferenceIfTypeUsed - Remove MSBuild property
OpenRewrite.CSharp.Recipes.RemoveMSBuildProperty - Remove MSBuild property
OpenRewrite.CSharp.Recipes.RemoveMSBuildProperty - Remove DotNetCliToolReference
OpenRewrite.CSharp.Recipes.RemoveDotNetCliToolReference - Ensure csproj attestation
OpenRewrite.CSharp.Recipes.EnsureCsprojAttestation - Change method name
OpenRewrite.Recipes.CSharp.Migration.Dotnet.ChangeMethodName - Change method name
OpenRewrite.Recipes.CSharp.Migration.Dotnet.ChangeMethodName - Change method name
OpenRewrite.Recipes.CSharp.Migration.Dotnet.ChangeMethodName - 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 - Remove method invocations
OpenRewrite.Recipes.CSharp.Migration.Dotnet.RemoveMethodInvocations - Remove method invocations
OpenRewrite.Recipes.CSharp.Migration.Dotnet.RemoveMethodInvocations - Remove method invocations
OpenRewrite.Recipes.CSharp.Migration.Dotnet.RemoveMethodInvocations - Remove method invocations
OpenRewrite.Recipes.CSharp.Migration.Dotnet.RemoveMethodInvocations - Replace
PlatformServiceswithAppContextOpenRewrite.Recipes.CSharp.Migration.Dotnet.Net3_0.UsePlatformAbstractionsReplacement - Find Newtonsoft.Json usage
OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net3_0.FindNewtonsoftJson - Find
HttpContext.Authenticationusage (removed in ASP.NET Core 3.0)OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net3_0.FindHttpContextAuthentication - Find synchronous IO usage (disabled in ASP.NET Core 3.0)
OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net3_0.FindSynchronousIO - Find
UseMvc/AddMvcusage (replaced in ASP.NET Core 3.0)OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net3_0.FindUseMvc - Find
WebHostBuilder/WebHost.CreateDefaultBuilderusage (replaced in ASP.NET Core 3.0)OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net3_0.FindWebHostBuilder - Find
CompactOnMemoryPressureusage (removed in ASP.NET Core 3.0)OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net3_0.FindCompactOnMemoryPressure - Find
IConnectionAdapterusage (removed in ASP.NET Core 3.0)OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net3_0.FindConnectionAdapter - Find obsolete localization APIs (ASP.NET Core 3.0)
OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net3_0.FindObsoleteLocalizationApis - Migrate ApiController to ControllerBase
OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net3_0.UseApiControllerBase - Find SpaServices/NodeServices usage (obsolete in ASP.NET Core 3.0)
OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net3_0.FindSpaServices