Convert classic csproj to SDK-style (net48)
OpenRewrite.Recipes.CSharp.Migration.Dotnet.NetFramework48.ConvertClassicCsprojToSdk
Rewrites 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>.
Tags
Recipe source
This recipe is only available to users of Moderne.
This recipe is available under the Moderne Proprietary License.
Options
| Type | Name | Description | Example |
|---|---|---|---|
String | SystemWebSdkVersion | Optional. Version of the MSBuild.SDK.SystemWeb SDK to pin in the Sdk attribute of ASP.NET web projects. Defaults to a recent stable release. | 4.0.110 |
Used by
This recipe is used as part of the following composite recipes:
Usage
In order to run C# recipes, you will need to use the Moderne CLI.
Once the CLI is installed, you can install this C# recipe package by running the following command:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.Migration.Dotnet
Then, you can run the recipe via:
mod run . --recipe OpenRewrite.Recipes.CSharp.Migration.Dotnet.NetFramework48.ConvertClassicCsprojToSdk