Retire explicitly reviewed legacy Core targets (deferred model)

Proprietary

Removes only selected literal legacy Core targets from one exact SDK project's unconditional TargetFrameworks list. Default off. Preserves all other targets, order and condition buckets. Removes the edited document's outdated MSBuildProject marker and marks its context attestation stale; never restores or materializes captured files. Apply the source plan, then externally restore/build/reindex the complete graph BEFORE typed recipes or adoption. Does not attest graph or consumer compatibility.

OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net8.RetireReviewedLegacyCoreTargets

Required

Exact repository-relative .csproj path; no globs, absolute paths or parent segments.

Semicolon-separated literal Core 1/2/3 or net5.0/net6.0/net7.0 targets to retire; all must be declared.

Already declared literal net8.0, net9.0 or net10.0. This never adds or replaces a target.

Default false. Owner explicitly accepts ending selected runtime/package assets and reviews graph/imports, incoming consumers and mappings, external consumers, CI -f and publish support including uncaptured policy. Known captured incoming old-target mappings block. Accepts a deferred invalid model: external complete-graph restore/build/reindex is required before typed recipes or adoption; no restore or graph attestation occurs here.

mod run . --recipe=OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net8.RetireReviewedLegacyCoreTargets \ -P ExactProjectPath='<ExactProjectPath>' \ -P SelectedLegacyTargets='<SelectedLegacyTargets>' \ -P ModernTargetToKeep='<ModernTargetToKeep>' \ -P RetirementPolicyReviewed=false

Required options ExactProjectPath, SelectedLegacyTargets, ModernTargetToKeep have no example to run with. Fill them in above.

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.