Files
YuliiaKovalova 8a52700bce Add TFM-aware buildTransitive->build forwarding guidance to msbuild skills (#836)
* Add TFM-aware buildTransitive->build forwarding guidance to msbuild skills

buildTransitive/*.props should forward through the corresponding build/*.props (ownership chain buildTransitive -> build -> shared) rather than importing buildMultiTargeting/ directly. When build/ is packed per-TFM (build/<tfm>/), the forwarder must include the TFM segment and derive it from the file own folder, not $(TargetFramework) (NuGet nearest-match can serve a different asset folder), otherwise transitive consumers hit MSB4019.

Updates extension-points (new Forwarding chain section), msbuild-antipatterns AP-13, and the msbuild-code-review agent. Lesson learned from microsoft/testfx#9431.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Clarify ambiguous props/targets glob in forwarder review check

Address review feedback on dotnet/skills#836: spell out ".props/.targets forwarders" instead of the ambiguous `buildTransitive/*.props|targets`.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Tighten forwarding-chain guidance to reduce skill token overhead

Condense the new extension-points Forwarding chain section (+26 -> +11 lines) and the AP-13 note by dropping the redundant non-TFM example and self-evident derivation explanation, keeping the chain rule, MSB4019 cause, and the TFM derivation expression. Lower token footprint addresses the skill-validator weighted-score token penalty without losing substance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address review nits: AP range and forward-slash path

Update the additional anti-patterns range to AP-16 through AP-22 (the reference doc now includes AP-22), and use a forward-slash build/MyPackage.props in the forwarding-chain prose to match the build/<tfm>/ convention used in the section.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Condense AP-13 forwarding note to a cross-reference to reduce token overhead

The full TFM-forwarding guidance lives in extension-points; AP-13 only needs a concise pointer. Removes duplication and trims the msbuild-antipatterns skill footprint flagged by the skill-validator token penalty.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Address remaining review nits: targets forwarders, single-source wording, quoted MSBuildThisFileDirectory

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-29 19:14:46 +02:00
..