← All recipes
Moderne licensed

Modernize .NET Framework 4.8 project (SDK + PackageReference)

Recipe IDOpenRewrite.Recipes.CSharp.Migration.Dotnet.NetFramework48.UpgradeToNetFramework48SdkArtifactOpenRewrite.Recipes.CSharp.Migration.Dotnet

Migrates a classic .NET Framework 4.8 csproj that uses packages.config to SDK-style with <PackageReference> entries. Combines MigratePackagesConfigToPackageReference and ConvertClassicCsprojToSdk so the resulting project builds with dotnet build on non-Windows machines via the Microsoft.NETFramework.ReferenceAssemblies.Net48 targeting pack.

Composite recipecsharpdotnetcsprojmigrationnet48Proprietary

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.NetFramework48.UpgradeToNetFramework48Sdk

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

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

Definition

This recipe runs the following recipes in order.