Migrate to .NET 6
ProprietaryMigrate C# projects to .NET 6, applying necessary API changes for obsoleted cryptographic types and other breaking changes. Includes all .NET Core 3.0, 3.1, and .NET 5 migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/6.0.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net6. UpgradeToDotNet6mod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net6. UpgradeToDotNet6Install 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 5
- 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
- Replace internal
FormattedLogValueswith a type alias - Cast
RedisValuetostringforJsonSerializer.Deserialize - Change type
- Change type
- Change type
- Change type
- Change type
- Change type
- Change type
- Change type
- Change type
- Change type
- Change type
- Change type
- Change type
- Change type
- Change type
- Change type
- Change type
- Use factory method for abstract cryptographic types
- Change method name
- Delete method argument
- Find
WebRequest/HttpWebRequest/WebClientusage (SYSLIB0014) - Find
Thread.Abortusage (SYSLIB0006) - Find
JsonSerializerOptions.IgnoreNullValuesusage (SYSLIB0020) - Find
X509Certificate2.PrivateKeyusage (SYSLIB0028) - Find
Assembly.CodeBase/EscapedCodeBaseusage (SYSLIB0012) - Use Environment.ProcessId
- Use Environment.CurrentManagedThreadId
- Use Environment.ProcessPath
- Use LINQ MaxBy() and MinBy()
- Use LINQ DistinctBy()
- Use Random.Shared
- Use ArgumentNullException.ThrowIfNull()
- Use string.Contains(char) overload
- Use string.StartsWith(char)/EndsWith(char) overload