Migrate to .NET 5

Proprietary

Migrate C# projects from .NET Core 3.1 to .NET 5.0. Includes all .NET Core 3.0 and 3.1 migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/5.0.

OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net5.UpgradeToDotNet5
mod run . --recipe=OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net5.UpgradeToDotNet5

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Migrate to .NET Core 3.1
  2. Change .NET target framework
  3. Upgrade NuGet package version
  4. Upgrade NuGet package version
  5. Upgrade NuGet package version
  6. Upgrade NuGet package version
  7. Upgrade NuGet package version
  8. Ensure csproj attestation
  9. Change type
  10. Change type
  11. Find Code Access Security usage (obsolete in .NET 5)
  12. Find PrincipalPermissionAttribute usage (SYSLIB0003)
  13. Find Encoding.UTF7 usage (SYSLIB0001)
  14. Find WinHttpHandler usage (removed in .NET 5)
  15. Find WinRT interop usage (removed in .NET 5)