Migrate to .NET 8
ProprietaryMigrate C# projects to .NET 8, applying necessary API changes. Includes all .NET 7 migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/8.0.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net8. UpgradeToDotNet8mod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net8. UpgradeToDotNet8Install 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.
- Migrate to .NET 7
- Change .NET target framework
- Upgrade NuGet package version
- Upgrade NuGet package version
- Upgrade NuGet package version
- Upgrade NuGet package version
- Upgrade NuGet package version
- Ensure csproj attestation
- Change method name
- Change method name
- Change method name
- Change method name
- Change type
- Find legacy serialization constructors (SYSLIB0051)
- Find
JsonSerializerOptions.AddContextusage (SYSLIB0049) - Find formatter-based serialization types (SYSLIB0050/0051)
- Find
Regex.CompileToAssemblyusage (SYSLIB0052) - Find
AesGcmconstructor without tag size (SYSLIB0053) - Use ArgumentException.ThrowIfNullOrWhiteSpace()
- Use ArgumentOutOfRangeException.ThrowIfGreaterThan()
- Use ArgumentOutOfRangeException.ThrowIfLessThan()
- Use ArgumentOutOfRangeException.ThrowIfZero()
- Find DateTime.Now/UtcNow usage (TimeProvider in .NET 8)
- Find ToImmutable*() that could use Frozen collections