Retarget to .NET Framework 4.8.1
ProprietaryRetargets a .NET Framework project to 4.8.1, applying the full 4.0 -> 4.8 chain and then bumping to 4.8.1. Updates <TargetFrameworkVersion> to v4.8.1, <TargetFramework> to net481, the app.config <supportedRuntime sku>, and the web.config targetFramework. .NET Framework 4.8.1 introduced no application-compatibility (retargeting) changes, so this step is purely the version bump. Compatibility caveat: 4.8.1 requires Windows 11 (21H2+) or Windows Server 2022+ at runtime and Visual Studio 2022 17.3+ to build, and is the only 4.x release with native Arm64 support. If any target machine runs Windows 10 or older Windows Server, stop at UpgradeToNetFramework48 instead. See https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/retargeting/4.8.x.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. NetFramework. UpgradeToNetFramework481mod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. NetFramework. UpgradeToNetFramework481Install 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 to .NET Framework 4.8
- Change .NET Framework version
- Change .NET target framework
- Change web.config target framework
- Ensure csproj attestation