Migrate to .NET 10

Proprietary

Migrate C# projects to .NET 10, applying necessary API changes. Includes all .NET 9 (and earlier) migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/10.0.

OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net10.UpgradeToDotNet10
mod run . --recipe=OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net10.UpgradeToDotNet10

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 9
  2. Change .NET target framework
  3. Change .NET target framework
  4. Upgrade NuGet package version
  5. Upgrade NuGet package version
  6. Upgrade NuGet package version
  7. Upgrade NuGet package version
  8. Upgrade NuGet package version
  9. Upgrade NuGet package version
  10. Ensure csproj attestation
  11. Rename MLDsa/SlhDsa SecretKey members to PrivateKey
  12. Rename Form.OnClosing/OnClosed to OnFormClosing/OnFormClosed (WFDEV004)
  13. Rename orient parameter to orientation in HtmlElement.InsertAdjacentElement
  14. Rename KnownNetworks to KnownIPNetworks (ASPDEPR005)
  15. Remove obsolete AddRazorRuntimeCompilation calls (ASPDEPR003)
  16. Remove deprecated WithOpenApi calls (ASPDEPR002)
  17. Find obsolete IActionContextAccessor/ActionContextAccessor (ASPDEPR006)
  18. Find ActivitySamplingResult.PropagationData behavior change
  19. Find BackgroundService.ExecuteAsync behavior change
  20. Find BufferedStream.WriteByte implicit flush behavior change
  21. Find DistributedContextPropagator default propagator change
  22. Find DllImportSearchPath.AssemblyDirectory behavior change
  23. Find DriveInfo.DriveFormat behavior change
  24. Find GnuTarEntry/PaxTarEntry default timestamp change
  25. Find obsolete IPNetwork/KnownNetworks (ASPDEPR005)
  26. Find KeyedService.AnyKey behavior change
  27. Find Type.MakeGenericSignatureType validation change
  28. Find obsolete Queryable.MaxBy/MinBy with IComparer<TSource> (SYSLIB0061)
  29. Find obsolete AddRazorRuntimeCompilation calls (ASPDEPR003)
  30. Find obsolete Rfc2898DeriveBytes constructors (SYSLIB0060)
  31. Find obsolete SslStream cipher properties (SYSLIB0058)
  32. Find catch (OutOfMemoryException) that may need ExternalException
  33. Find obsolete SystemEvents.EventsThreadShutdown (SYSLIB0059)
  34. Find obsolete WebHostBuilder/IWebHost/WebHost usage (ASPDEPR004/ASPDEPR008)
  35. Find obsolete Windows Forms APIs (WFDEV004/005/006)
  36. Find deprecated WithOpenApi calls (ASPDEPR002)
  37. Find X500DistinguishedName string constructor stricter validation
  38. Find obsolete XsltSettings.EnableScript (SYSLIB0062)
  39. Find obsolete SSL authentication enum types
  40. Find obsolete Form.OnClosing/OnClosed usage (WFDEV004)
  41. Find obsolete Clipboard.GetData calls (WFDEV005)