Retarget to .NET Framework 4.8
ProprietaryRetargets a .NET Framework project to 4.8, the recommended modern target. Applies every intermediate minor-version step in order (4.0 -> 4.5 -> 4.5.1 -> 4.5.2 -> 4.6 -> 4.6.1 -> 4.6.2 -> 4.7 -> 4.7.1 -> 4.7.2 -> 4.8), updating <TargetFrameworkVersion> and <TargetFramework> in legacy and SDK-style csproj files, the <supportedRuntime sku> in app.config, and the targetFramework attribute in web.config at each step, and flagging affected source for review. Notable retargeting changes when reaching 4.8: managed crypto classes no longer throw in FIPS mode (Switch.System.Security.Cryptography.UseLegacyFipsThrow=true to revert); a third wave of accessibility improvements applies (keep legacy with all of Switch.UseLegacyAccessibilityFeatures, .2, and .3); HwndHost resizes correctly under per-monitor DPI; several WF/WPF checksum/hash defaults move to SHA-256. See https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/retargeting/4.8.x.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. NetFramework. UpgradeToNetFramework48mod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. NetFramework. UpgradeToNetFramework48Install 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.
- Retarget .NET Framework 4.7.1 to 4.7.2
- Change .NET Framework version
- Change .NET target framework
- Change web.config target framework
- Ensure csproj attestation
- Find managed crypto classes (FIPS mode behavior change)