Add a modern target to one SDK Framework library
ProprietaryAppends a released modern .NET target to one explicitly selected literal Microsoft.NET.Sdk Framework library, preserving all existing targets in order. Requires caller confirmation of compatible SDK/build policy; skips unknown type, target, import, central and output policy. Does not port source, upgrade dependencies, convert projects or change application/test hosts.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net10. AddModernTargetToFrameworkLibraryRequired
Exact captured relative .csproj path; no globs.
Set true only after reviewing the complete project, ancestor/global/environment and CI/pack policy, including files outside the captured snapshot. Confirm an ordinary library, no generator/analyzer/test ownership, a released SDK supporting every retained target and the new target, and isolated outputs. The default is false; target frameworks do not establish host compatibility.
Optional
Released portable .NET target: net8.0, net9.0 or net10.0. Defaults to net10.0.
Defaults to true. Intermediate composition steps may set false and finish with EnsureCsprojAttestation.
mod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net10. AddModernTargetToFrameworkLibrary \
-P ExactProjectPath= OneOf/ OneOf. csproj \
-P CompatibleBuildPolicyConfirmed= falseInstall 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.