Convert classic csproj to SDK-style (net48)
Recipe ID
OpenRewrite.Recipes.CSharp.Migration.Dotnet.NetFramework48.ConvertClassicCsprojToSdkArtifactOpenRewrite.Recipes.CSharp.Migration.DotnetRewrites a non-SDK .NET Framework 4.8 .csproj into SDK-style form: sets Sdk="Microsoft.NET.Sdk", removes the legacy MSBuild boilerplate (<Import>s, default <Compile> items, configuration-conditional <PropertyGroup> blocks, SDK-managed properties), and replaces <TargetFrameworkVersion>v4.8</TargetFrameworkVersion> with <TargetFramework>net48</TargetFramework>.
Single recipecsharpdotnetcsprojnet48sdk-styleProprietary
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.ConvertClassicCsprojToSdkIf the recipe isn’t available locally, install it with:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.Migration.DotnetOptions
| Name | Type | Description |
|---|---|---|
SystemWebSdkVersion | String | Version of the MSBuild.SDK.SystemWeb SDK to pin in the Sdk attribute of ASP.NET web projects. Defaults to a recent stable release.e.g. 4.0.110 |