Migrate packages.config to <PackageReference> (net48)
Recipe ID
OpenRewrite.Recipes.CSharp.Migration.Dotnet.NetFramework48.MigratePackagesConfigToPackageReferenceArtifactOpenRewrite.Recipes.CSharp.Migration.DotnetMoves NuGet package entries from packages.config into <PackageReference> items in the sibling .csproj, drops facade packages provided transitively by Microsoft.NETFramework.ReferenceAssemblies.Net48, adds that reference-assemblies package, and removes the now-empty packages.config. Scoped to .NET Framework 4.8 projects.
Single recipecsharpdotnetpackages-configcsprojnet48Proprietary
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.MigratePackagesConfigToPackageReferenceIf the recipe isn’t available locally, install it with:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.Migration.DotnetOptions
| Name | Type | Description |
|---|---|---|
ReferenceAssembliesVersion | String | Version of the Microsoft.NETFramework.ReferenceAssemblies.Net48 package to add. Defaults to 1.0.3.e.g. 1.0.3 |