Skip to content

Commit d01a232

Browse files
EvangelinkAmaury LeveCopilot
authored
Stop flagging backslash path separators in MSBuild quality review (#8816)
Co-authored-by: Amaury Leve <amaurylevenospam@gmail.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0bade43 commit d01a232

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/agents/msbuild-reviewer.agent.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ Each rule has a category letter and an index. Cite findings as `Rule A-3`, `Rule
123123
2. **NuGet package file name mismatch** — Files in `build/` and `buildTransitive/` folders **must** match the NuGet package ID exactly (e.g. `<PackageId>.props`). A mismatch causes NuGet to silently skip the import. **Severity: 🔴 Error.**
124124
3. **Overwriting `CustomBefore*` / `CustomAfter*` properties** — These properties must be appended to (with `;`), not overwritten, to avoid dropping prior hooks. **Severity: 🔴 Error.**
125125
4. **Missing import guard pattern** — When a package ships both `.props` and `.targets`, the `.targets` file should guard-import the `.props` using a sentinel property to handle projects that only import `.targets`. **Severity: 🟡 Warning.**
126-
5. **Cross-platform path separators**`.props`/`.targets` files that ship in NuGet packages must use forward slashes in paths for Linux/macOS compatibility. Backslash-only paths break on non-Windows. **Severity: 🔴 Error.**
126+
127+
> **Not a rule — do not flag:** Backslash path separators in `.props`/`.targets` files. MSBuild normalizes `\` to `/` on non-Windows for `Import Project`, `UsingTask AssemblyFile`, and item `Include` globs. Mixed or backslash-only paths in this repository are intentional and work cross-platform.
127128
128129
### Category E: NuGet Build Extension Layout
129130

@@ -231,7 +232,6 @@ Only the following classes of fix are considered safe enough to ship as a draft
231232
- Adding `Condition="'$(Prop)' == ''"` to a clearly-intended default property setter (Rule B-1).
232233
- Quoting both sides of a condition expression (Rule B-2).
233234
- Adding `Exists()` guard to an obviously optional import (Rule D-1).
234-
- Replacing `\` with `/` in NuGet package files that ship to customers (Rule D-5).
235235

236236
Never auto-fix:
237237

0 commit comments

Comments
 (0)