Map reviewed target-specific AdditionalFiles
ProprietaryAtomically splits explicitly reviewed unconditional AdditionalFiles templates in one SHA256-sealed SDK project. The new target uses a literal existing old-target path; other targets keep the template. This does not copy files, verify baseline content or assert API compatibility. Requires owner review and is never composed into a framework upgrade. Unknown imports, item metadata and conflicting items refuse the entire edit.
OpenRewrite. CSharp. Recipes. MapReviewedAdditionalFilesRequired
Exact repository-relative slash-separated .csproj path.
Mandatory SHA256 of UTF-8 XmlParser.Print(project), without a BOM preamble. Seals this reviewed project state.
Complete semicolon-separated list of expected AdditionalFiles Include paths, each containing exactly one $(TargetFramework) path component. All must match once.
Owner-reviewed existing baseline directory, e.g. net9.0. No baseline text is captured or hashed by this recipe.
Literal declared target that should use the reviewed old-target paths, e.g. net10.0.
Optional
Complete captured .props/.targets inventory as semicolon-separated path=printed-UTF8-SHA256 entries, or empty for none. Only unconditional literal Copyright, LangVersion, Nullable, TreatWarningsAsErrors, AnalysisLevel, EnforceCodeStyleInBuild and NoWarn policy is accepted.
mod run . --recipe= OpenRewrite. CSharp. Recipes. MapReviewedAdditionalFiles \
-P ProjectPath= '<ProjectPath>' \
-P PrintedSourceSha256= '<PrintedSourceSha256>' \
-P TemplatePaths= '<TemplatePaths>' \
-P OldTargetFramework= '<OldTargetFramework>' \
-P NewTargetFramework= '<NewTargetFramework>'Required options ProjectPath, PrintedSourceSha256, TemplatePaths, OldTargetFramework, NewTargetFramework 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.