Commit Graph

20 Commits

Author SHA1 Message Date
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
YuliiaKovalova 67e2a47e87 Trim dotnet-msbuild skill-menu under 15K char limit (#809)
The rendered skill-menu for the dotnet-msbuild plugin was 16,679 characters, exceeding the 15,000 limit. Trim two categories of content from the 18 skill descriptions that do not help agents decide when to invoke a skill:

- Remove INVOKES: clauses (which MCP tools / fallback shell commands a skill runs internally) — implementation mechanics, not routing signal.
- Remove the boilerplate 'Only activate in MSBuild/.NET build context.' repeated verbatim in all 18 skills — redundant, since every description is already MSBuild-specific and each DO NOT USE FOR still excludes non-MSBuild build systems.

USE FOR triggers and DO NOT USE FOR cross-references are preserved. Aggregate skill description size drops from 14,551 to 12,536 chars (rendered menu 16,679 -> 14,664).

Co-authored-by: Yuliia Kovalova <ykovalova@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-24 08:50:46 +02:00
Daniel Plaisted 8a437b1d4f Add anti-pattern for forking a project instance via <MSBuild> with path-neutral global properties (#770)
Adds msbuild-antipatterns AP-22 (in references/additional-antipatterns.md): using
the <MSBuild> task to build/publish a project with an extra global property that
does not change the output path forks a distinct instance sharing the same
OutputPath/IntermediateOutputPath as the instance the graph already builds,
causing duplicate builds and parallel-write races on PDBs, *.sourcelink, and
project.assets.json. Covers both shapes:
  (a) a project re-invoking itself (publish-on-build), and
  (b) project A invoking Build/Publish on another project B it consumes
      (e.g. a test/layout project publishing a tool) — the more common trigger.
GOOD fixes: (a) static _IsPublishing + DependsOnTargets with a cycle guard;
(b) let the producer publish in its own build and have the consumer sequence it
with a non-output ProjectReference instead of re-publishing it. Also updates the
SKILL.md pointer (AP-16 through AP-22) and the quick-reference checklist.

Extends check-bin-obj-clash with the matching cause (self or cross-project
<MSBuild> Build/Publish with a path-neutral global property), binlog-based
detection via the evaluations/global-properties/double_writes tools, the two
fixes, and an _IsPublishing row in the global-properties table.

Adds eval coverage: a publish-on-build smell in the msbuild-antipatterns review
fixture (LibA.csproj) plus a matching rubric line in eval.yaml and eval.vally.yaml.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-16 10:53:14 +02:00
YuliiaKovalova da5e63e878 [dotnet-msbuild] Fix AP-13/AP-14 false positives and add source-vs-packed layout guidance (#687)
* [dotnet-msbuild] Fix AP-13/AP-14 false positives and add source-vs-packed layout guidance

The msbuild-quality-review run on microsoft/testfx surfaced two confidently-stated
false positives that the maintainer rightly pushed back on:

1. The reviewer claimed unguarded `<Import>` forwarders in MSTest's NuGet
   `build/<tfm>/` folders point at non-existent paths under `buildTransitive/<tfm>/`.
   In reality those folders are produced at pack time by the `.nuspec` `<file
   target="...">` mappings, so the forwarders resolve correctly in every restored
   package.

2. The reviewer flagged backslashes in `<Import Project="...\...\...">` as a
   cross-platform 🔴 error. MSBuild's evaluator normalizes `\` to `/` on
   Unix-like systems via `FileUtilities.MaybeAdjustFilePath` /
   `ConvertToUnixSlashes` before resolving the path, so existing backslash-style
   imports work everywhere — confirmed by years of shipping MSTest to Linux/macOS
   users.

This change updates the rubric so the same false positives don't recur across
every consumer of the dotnet-msbuild plugin:

* `msbuild-antipatterns/SKILL.md` AP-13 — adds an explicit "NuGet package
  forwarders" exception and tells reviewers to consult `.nuspec` /
  `<PackagePath>` before flagging.
* `msbuild-antipatterns/SKILL.md` AP-14 — rewritten to distinguish where
  backslashes are a real bug (raw `<Exec>` shell strings, CDATA, non-MSBuild
  consumers — keep 🔴) from where they're only style (`<Import>` and other
  evaluator-routed paths — 🔵 with a cite to the MSBuild source).
* `extension-points/SKILL.md` — adds a "Source Tree vs Packed Layout" section
  documenting the three packaging mechanisms (.nuspec `<file>` mappings, csproj
  `<PackagePath>` metadata, SDK pack conventions) that legitimately reshape the
  layout, with the cross-check procedure reviewers must run before flagging
  "missing-file" imports.
* `agents/msbuild-code-review.agent.md` — Discovery now records the projected
  packed layout; Category 4 references the new AP-13/AP-14 nuances; new
  "Veracity gate" step downgrades or drops 🔴 findings that would imply
  currently-shipping CI is broken.

No fixtures change: the `tests/dotnet-msbuild/msbuild-antipatterns/eval.yaml`
rubric does not enumerate AP-13/AP-14 by id, and the F#-specific scenarios are
unaffected. Markdownlint passes on all edited files.

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

* Address PR review feedback

- extension-points: rewrite .nuspec example so the source file is genuinely shared (single buildTransitive/common/MyAdapter.props fan-out instead of three already-per-TFM sources); clarify <file target=> folder-vs-rename semantics.
- extension-points: replace semicolon-list PackagePath example with the unambiguous multi-<None> form, and note in prose that semicolon syntax is also supported. Avoids reader confusion noted in review.
- msbuild-antipatterns AP-13 cross-check: align search scope with extension-points (project directory AND any parent directory) so reviewers don't miss shared mono-repo nuspecs.

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

* AP-13: drop ../ link to extension-points to satisfy skill-validator

Skill-validator rejects file references that traverse out of the skill directory (parent-directory traversal). Replace the markdown link with a plain-text reference to the dotnet-msbuild/extension-points skill — the prose is still discoverable to humans and to the agent that loads the plugin, but no longer trips the validator.

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

* Address second round of PR review feedback

- AP-13: replace <tfm> placeholders inside XML attribute strings with concrete TFM examples (net8.0) so the snippets are valid copy-pasteable XML.
- AP-13 & extension-points: bound the .nuspec search to project directory + IMMEDIATE parent only (no unbounded walking); wording now identical in both docs.
- AP-14: add explicit text severity next to severity emoji (🔴 Error / 🔵 Style) for accessibility — screen readers and plain-text copies now convey severity without relying on color/emoji rendering.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-25 16:08:01 +00:00
Jan Krivanek 0724ccf8ac Update binlog mcp name (#684) 2026-05-22 13:48:09 +00:00
Jan Krivanek 1a6e78c9c6 Add binlog MCP usage to other msbuild skills/agents (#683)
* Add binlog MCP usage to other msbuild skills/agents

* Apply suggestions from code review

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

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-22 15:32:31 +02:00
YuliiaKovalova 5f1170152b Add MSBuild target authoring skills (target-authoring, property-patterns, item-management, extension-points) (#669)
* Add 4 MSBuild target authoring skills for dotnet-msbuild plugin

New skills:
- target-authoring: three-level target chain, DependsOn extension, naming conventions
- property-patterns: conditional defaults, composition, path normalization, TFM helpers
- item-management: Include/Remove/Update, batching, transforms, FileWrites registration
- extension-points: CustomBefore/After hooks, import gating, NuGet build extensions

Each skill includes eval.yaml tests with anti-pattern fixtures.

Closes #668

* Address Copilot review feedback

- target-authoring: Reword DO NOT USE clause to exclude only deep
  incremental-build diagnostics, not basic Inputs/Outputs usage
- property-patterns: Close unclosed XML elements in String Functions
  snippet (PropertyGroup, TargetFrameworkMoniker)
- extension-points: Add missing CustomAfterMySDK property definition
  to match the import at bottom of example

* Remove accidental pr-body.md file

* Fix wildcard import placeholder path and quote NormalizePath args

- extension-points: Use full MSBuildExtensionsPath expression and
  consistent Exists() casing in wildcard import example
- property-patterns: Quote property arguments in NormalizePath call

* Tune eval prompts to reduce overfitting

Rewrite all 4 eval prompts as natural developer problem descriptions
instead of skill-aligned checklists. Softens technique-prescriptive
rubric items. Result: overfitting scores drop from 0.15-0.31 to
0.06-0.08 (all green). property-patterns now passes eval.

* Fix Copilot review round 3: quote property function args, fix fixture

- property-patterns: Quote  in IsPathRooted call
- extension-points: Quote  in GetDirectoryNameOfFileAbove
- item-management fixture: Use literal semicolon instead of %3B in WriteLinesToFile

* Add harder multi-file eval scenarios for all 4 skills

Each skill now has a second scenario with multi-file setups containing
interacting bugs that require cross-file analysis:

- target-authoring: SDK .targets + Directory.Build.targets with 3 bugs
  (target redefinition, fragile BeforeTargets, duplicate DependsOn chain)
- property-patterns: nested Directory.Build.props with 5 bugs
  (import order, unconditional overwrite, unquoted condition, missing
  trailing slash, NoWarn overwrite)
- item-management: csproj with 5 interacting bugs (Include vs Update,
  cross-product batching, eval-time FileWrites, too-broad Remove glob)
- extension-points: Directory.Build.props/targets + NuGet package with
  6 bugs (inverted guard, late ImportByWildcard, CustomBefore overwrite,
  missing Exists guard, target name collision, internal target hook)

Timeouts increased to 180s for all scenarios.

* Fix review round 4: revert unintended README change, quote intrinsic call in condition

* Improve eval quality for 4 new MSBuild authoring skills

Eval improvements across target-authoring, property-patterns,
item-management, and extension-points skills:

- Rewrite prompts to describe observable symptoms without naming
  MSBuild concepts, inspired by real dotnet/msbuild and dotnet/sdk
  issues (msbuild#2470, #12894, #13056, #4109, sdk#43908)
- Broaden assertion regex patterns to test for diagnostic outcomes
  rather than skill-specific vocabulary
- Improve rubric items to test understanding and diagnosis flow
  (diagnosis -> root cause -> fix) instead of skill terminology
- Add task-completion 'fix it' scenario to each skill with
  file_contains assertions that verify the agent applied correct
  patterns (CompileDependsOn append, FileWrites, Exists guard, etc.)
- Remove leading 'Anti-pattern:', 'BUG N:' comments from fixture
  files that were giving away answers to the baseline agent, making
  scenarios more realistic and better at measuring skill value

Each skill now has 3 scenarios: basic review, hard multi-file review,
and a task-completion fix scenario. Total: 12 scenarios across 4 skills.

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

* Fix review comments: quote TFM intrinsic, fix PrivateAssets example

- property-patterns SKILL.md: Quote the GetTargetFrameworkIdentifier
  intrinsic call result in the Condition to match the 'always quote
  both sides' guidance and avoid brittle parse when empty
- item-management SKILL.md: Replace PackageReference Update on
  Microsoft.NETCore.App (not a real user-added item) with Include
  on Microsoft.CodeAnalysis.NetAnalyzers (a concrete analyzer package)

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

* Fix eval activation and timeouts based on eval run results

- Add MSBuild domain terms to prompts (e.g., 'MSBuild targets',
  'MSBuild property patterns', 'MSBuild item groups', 'MSBuild
  extension points') to improve skill activation rates — skills
  were NOT ACTIVATED in plugin mode due to prompts being too
  symptom-focused without domain keywords
- Increase timeouts: review scenarios 180s -> 240s, fix-it
  scenarios 180s -> 300s to avoid timeout-related scoring penalties
- Keep prompts symptom-driven but include enough domain context
  for the skill router to activate the correct skill

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

* Fix PR review comments and improve eval quality

Review comment fixes:
- TargetAuthoring.csproj: Replace %22/%3B URL encoding with XML
  escaping (&quot;/;) so generated C# code is valid
- target-authoring eval: Fix prompt referencing 'schema files' when
  fixture has endpoint definitions — now says 'endpoint list'
- property-patterns eval: Reword LangVersion rubric — unconditional
  assignment in .props IS overridable by csproj but prevents override
  from earlier imports and command-line properties
- extension-points eval: Add stronger activation terms to Fix scenario
  prompt (explicit mention of CustomBeforeMicrosoftCommonTargets)

Eval quality improvements based on CI results:
- Shorten target-authoring rubric items to reduce overfitting (was 0.30)
- Remove 'Focus on target authoring patterns' instruction from hard
  scenario prompt (was directing agent too specifically)

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

* Improve eval: increase timeout, add activation keywords, explicit fix instructions

- property-patterns 'Diagnose multi-level': timeout 240s -> 360s (was hitting limit at 249s)
- target-authoring 'Diagnose custom target': add CompileDependsOn/incremental build keywords for better skill activation
- property-patterns 'Fix': add 'edit ... directly' to prompt to encourage file edits
- target-authoring 'Fix': add 'edit ... directly' to prompt
- item-management 'Fix': add 'edit ... directly' to prompt

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

* Fix target-authoring skill description and eval prompts for plugin activation

The skill description said 'DO NOT USE FOR: deep incremental-build diagnostics'
which caused the plugin agent to skip it for scenarios about build regressions.
Clarified that the skill IS for diagnosing target authoring mistakes (missing
Inputs/Outputs, broken dependency chains) that cause full rebuilds.

Also updated eval prompts to use 'target authoring mistakes' framing and
increased Fix scenario timeout to 360s.

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

* Increase eval timeouts: extension-points NuGet (240->360s), item-management cascading (240->360s)

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

* Fix 3 fresh PR review comments + update eval prompts for target-authoring

- property-patterns/SKILL.md: add warning that TargetFramework-conditioned
  PropertyGroups must be in .targets not .props (empty in single-target .props)
- extension-points/SKILL.md: add Exists() guard to GetPathOfFileAbove Import
  to prevent build failure when no parent file is found
- target-authoring/SKILL.md: fix comment mismatch — validation target runs
  via dependency chain, not BeforeTargets; update comment accordingly
- target-authoring/eval.yaml: reframe 'Diagnose' and 'Fix' prompts to use
  'dependency chain' / 'authoring patterns' language (avoids routing to
  incremental-build skill which also claims Inputs/Outputs diagnostics)

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

* Improve skill descriptions for reliable plugin-mode activation

Add 'Only activate in MSBuild/.NET build context.' prefix to all 4 skills
for consistency with existing skills in the plugin.

Add explicit 'diagnosing and fixing' and 'reviewing' keywords to USE FOR
sections so the SDK selects these skills over the broader
msbuild-antipatterns skill when prompts ask to fix or review specific
item/extension/property/target patterns.

Add 'general MSBuild anti-pattern catalog (use msbuild-antipatterns)' to
DO NOT USE FOR sections to help the SDK disambiguate.

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

* Fix skill descriptions: shorten to under 1024-char SDK limit

All 4 new skills had descriptions exceeding the 1024-character maximum
enforced by the skill-validator check command. The Copilot SDK silently
ignores skills with over-length descriptions, causing 0% activation in
both isolated and plugin evaluation modes.

Shortened all 4 descriptions while preserving key activation keywords
(USE FOR / DO NOT USE FOR / 'Only activate in MSBuild/.NET build context').

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

* Address PR review comments

- target-authoring eval.yaml: fix prompt to say 'Outputs attribute' (not
  'Returns') since the fixture uses Outputs on a query target, which is
  the actual bug that causes MSBuild to skip re-execution
- property-patterns eval.yaml: reword prompt and rubric — the real issue
  is unconditional assignment breaking parent-child Directory.Build.props
  inheritance, not project files being unable to override properties
- extension-points SKILL.md: fix GetPathOfFileAbove example to factor
  the path into a property so Project= and Condition= use the same value
  consistently (avoiding the ..\\ vs ..\ discrepancy)
- CustomSdk.targets: add WriteLinesToFile to CoreCodeGen so it actually
  creates the .g.cs output files (prevents compilation failure in fixture)

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

* Fix property-patterns fixtures to match rubric claims

Scenario 1 (path merge bug):
- PropertyPatterns.csproj: add OutputPath using CustomOutputDir without a
  trailing separator, making the merge bug observable
  (artifacts\binPropertyPatterns\ instead of artifacts\bin\PropertyPatterns\)

Scenario 2 (multi-level hierarchy bugs):
- hard/Directory.Build.props: make LangVersion unconditional so it
  overwrites the child src/Directory.Build.props LangVersion=preview,
  matching the rubric claim about parent unconditional assignments
- hard/Directory.Build.props: add NoWarn=NU1702 (conditional default)
  so parent suppressions are visible but lost when the child's
  unconditional <NoWarn>CS1591;IDE0005</NoWarn> overwrites them after import

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-22 09:39:23 +00:00
Jan Krivanek e951d69ab9 dotnet-msbuild: move AITools.BinlogMcp source to dotnet-tools feed (#680)
The MCP package was relocated from the dotnet-eng public feed to the dotnet-tools public feed on dnceng. Update plugin.json --add-source URL and the SKILL.md fallback note accordingly.
2026-05-21 13:14:51 +02:00
Jan Krivanek dfc8aa786d dotnet-msbuild: register AITools.BinlogMcp and use it from binlog-failure-analysis (#673)
* dotnet-msbuild: register AITools.BinlogMcp and use it from binlog-failure-analysis

Adds the AITools.BinlogMcp MCP server (pulled via dnx from the dotnet-eng public NuGet feed, prerelease, no version pin) to the dotnet-msbuild plugin and rewrites the binlog-failure-analysis SKILL.md to lead with the MCP tools (binlog_overview, binlog_errors, binlog_search, binlog_items, binlog_properties, binlog_imports, binlog_nuget). The text-log replay workflow is kept as a fallback for environments without the MCP.

* Improve skills

* Reflect PR comments
2026-05-19 19:45:34 +02:00
Dan Moseley e7ec5a77a0 Fix markdownlint CI workflow (startup_failure since inception) (#629) 2026-05-08 08:33:08 +01:00
Copilot 2f9922e073 Remove LangVersion=latest from skill examples and test fixtures (#608)
* Initial plan

* Remove LangVersion=latest from skill docs and test fixtures

Per official C# docs, LangVersion should not be set to `latest` as
it causes builds to silently vary across machines with different SDKs.
Best practice is to omit LangVersion entirely and let the TFM determine
the correct C# version automatically.

- Update msbuild-modernization/SKILL.md: remove LangVersion=latest from
  example and add explicit guidance to omit LangVersion
- Update directory-build-organization/SKILL.md: remove from example
- Update directory-build-organization/references/multi-level-examples.md:
  remove from all 4 examples
- Update msbuild-antipatterns/SKILL.md: remove from AP-08 examples
- Remove LangVersion=latest from 11 test fixture project files

Agent-Logs-Url: https://github.com/dotnet/skills/sessions/7a3d2722-770b-4010-a6e8-70c92668ad4c

Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com>

* Fix LangVersion guidance and stale eval rubric reference

Agent-Logs-Url: https://github.com/dotnet/skills/sessions/e89afcd8-7227-424b-9c8c-9ec0ce7113c2

Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com>
2026-05-05 15:45:56 +02:00
Tomas Grosup a55227f030 Fold F# .fsproj ordering into msbuild-antipatterns AP-05 (#577)
* Add fsharp-project-structure skill for .fsproj file ordering and .fsi files

Teaches agents F# compilation order rules, signature file placement,
and common FS0039/FS0010/FS0034 fixes. Includes eval with three scenarios
(add module, fix broken order, add signature file) and test fixtures.

Validated +64.6% improvement on gpt-4.1 (significant, CI [+17.2%, +63.0%]).

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

* Add fsharp-project-structure skill for .fsproj file ordering and .fsi files

Teaches agents F# compilation order rules, signature file placement,
and common FS0039/FS0010/FS0034 fixes. Includes eval with three scenarios
(add module, fix broken order, add signature file) and test fixtures.

Validated +64.6% improvement on gpt-4.1 (significant, CI [+17.2%, +63.0%]).

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

* Update plugins/dotnet/skills/fsharp-project-structure/SKILL.md

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

* Fold F# project-structure into msbuild-antipatterns AP-05

Scraps the standalone fsharp-project-structure skill and instead adds a
short F# exception to AP-05 (Manual File Listing in SDK-Style Projects):
F# compilation is order-dependent, so .fsproj files must list Compile
items in dependency order (utilities first, entry point last), and .fsi
signature files must appear immediately before their companion .fs.

The three F# eval scenarios (add module, fix broken order, add signature
file) are ported into tests/dotnet-msbuild/msbuild-antipatterns/eval.yaml
with fixtures isolated under a fsharp/ subfolder (with empty
Directory.Build.{props,targets} to prevent the existing C#-antipattern
fixture files from leaking into the F# builds).

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-27 15:07:18 +02:00
Jan Krivanek 05aeb657e6 Add license to agent files (#568) 2026-04-21 12:57:18 +00:00
Amaury Levé 51d29a086f Improve test skills (#428) 2026-03-30 15:08:33 +02:00
YuliiaKovalova 14346ff3b2 Enrich build-perf-diagnostics skill with MSBuild team and community insights (#342)
* Enrich build-perf-diagnostics skill with MSBuild team and community insights

Additions (pure knowledge, no MCP dependency):
- RAR: dotnet/msbuild#2015 context, DisableTransitiveProjectReferences, ReferenceOutputAssembly
- Copy tasks: SkipCopyUnchangedFiles, --artifacts-path, Copy batching (dotnet/msbuild#12884)
- Dev Drive (ReFS): copy-on-write + reduced Defender scans, OrchardCore 7257 Copy tasks benchmark
- Evaluation: NuGetSdkResolver 180-400ms overhead (dotnet/msbuild#4025), EnableDefaultItems
- NuGet: RestoreUseStaticGraphEvaluation (20s+ savings in large builds)
- Project graph shape: wide vs deep (40% faster clean, 20% faster incremental)
- MSBuild Server: MSBUILDUSESERVER=1 for CLI caching
- Inline task overhead: 1s vs 3ms (RoslynCodeTaskFactory vs compiled)
- Misleading ResolveProjectReferences time (dotnet/msbuild#3135)
- Incrementality anti-patterns (dotnet/msbuild#13206)
- Impact categorization (HIGH/MEDIUM/QUICK WINS)
- Quick Wins: expanded to 15 items (from 7)

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

* Fix minor issues from review comments

- Fix missing closing XML tag for CreateHardLinksForCopyFilesToOutputDirectoryIfPossible in Quick Wins checklist
- Clarify confusing Copy task batching wording per reviewer feedback

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

* Trim skill to reduce token overhead

Remove standalone sections (MSBuild Server, Inline Tasks,
ResolveProjectReferences, Incrementality Anti-patterns) that add
~1400 extra tokens without benefiting the evaluated scenario.
Consolidate Quick Wins checklist accordingly.

These sections can be contributed as separate skills in follow-up PRs.

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

* Add separate skills for MSBuild server, inline tasks, and ResolveProjectReferences

Extract content removed from build-perf-diagnostics into standalone skills
to keep each skill focused and avoid token budget bloat:

- msbuild-server: MSBUILDUSESERVER=1 for CLI incremental caching
- inline-task-overhead: RoslynCodeTaskFactory ~1s overhead vs ~3ms compiled
- resolve-project-references: misleading Target Performance Summary time
  (dotnet/msbuild#3135), guides users to Task Performance Summary instead

Incrementality anti-patterns content was not extracted as a separate skill
because the existing incremental-build skill already covers that area.

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

* Add github.com/dotnet/msbuild to known-domains.txt

Required by reference scanner for MSBuild issue links in
build-perf-diagnostics and resolve-project-references skills.

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

* Replace full dotnet/msbuild URLs with shorthand notation

The reference scanner reads known-domains.txt from upstream main,
not from the PR branch. Use shorthand 'dotnet/msbuild#NNNN' format
(consistent with the rest of the file) instead of full URLs.

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

* Address review comments and fix reference scanner errors

- Remove https://aka.ms/devdrive URLs that trigger reference scanner
- Soften unsourced benchmark claims (OrchardCore Copy tasks, 20s+
  restore savings, 40%/20% graph shape improvements) per reviewer
  feedback to use workload-dependent language instead

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

* Add eval tests for new skills; remove inline-task-overhead

Add eval.yaml and test fixtures for msbuild-server and
resolve-project-references skills:
- msbuild-server: tests CLI build perf scenario with developer report
- resolve-project-references: tests misleading target perf summary
  with multi-project setup and perf report

Remove inline-task-overhead skill: failed 3 evaluation iterations
(avg +2.7%) because the baseline LLM already knows about
RoslynCodeTaskFactory overhead — the skill doesn't add enough
unique value to meet the 10% improvement threshold.

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 review comments

- Add caveat that DisableTransitiveProjectReferences may require
  adding direct references for consumed types
- Fix escaped quotes in Quick Wins RunAnalyzers checklist item
- Add OutputType=Exe and Main entry point to msbuild-server fixture
- Change 'solution' to 'project' in resolve-project-references report
- Trim trailing spaces in developer-report.md

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

* Restore accidentally removed known-domains.txt

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

* Fix remaining review comments

- Quote -flp argument in resolve-project-references bash example
  to handle semicolons in POSIX shells
- Format LibA/Class1.cs and LibB/Class1.cs across multiple lines
  for consistency with other test fixtures
- Rename msbuild-server/Program.cs to Calculator.cs to match content

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

---------

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-03-17 15:55:44 +01:00
Jan Krivanek 7e7dabd343 [WIP] Improve msbuild skills descriptions (#384)
* Improve msbuild skills descriptions

* Improve descriptions
2026-03-17 14:30:58 +01:00
Dan Moseley d5bd687cf6 Fix msbuild spec conformance violations (#247)
- msbuild-antipatterns: Move AP-16 through AP-21 and checklist to
  references/additional-antipatterns.md (body: 384 lines, was 583)
- directory-build-organization: Replace cross-skill reference to
  ../msbuild-antipatterns/SKILL.md with local reference file
  references/targetframework-props-pitfall.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-06 14:15:50 +01:00
Viktor Hofer 887dafdbb4 Fix typos and grammar in msbuild.agent.md (#191)
* Fix typos and grammar in msbuild.agent.md

- Close unclosed backtick on #tool:web/fetch reference
- Fix 'help user to troubleshoot' -> 'help the user troubleshoot'
- Fix 'nor' -> 'or' (no preceding 'neither')
- Fix 'a sub-agents' -> 'sub-agents'

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

* Update plugins/dotnet-msbuild/agents/msbuild.agent.md

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

* Update plugins/dotnet-msbuild/agents/msbuild.agent.md

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

* Fix incorrect skill reference in build-perf-baseline

Replace non-existent 'analyzer-performance' skill reference with
'build-perf-diagnostics' which contains the analyzer performance guidance.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-04 14:44:00 +01:00
Jared Parsons 4793aa27e9 Replace binlog mcp with replay to textlog (#162)
Co-authored-by: Jan Krivanek <jankrivanek@microsoft.com>
2026-03-02 21:32:23 +01:00
Viktor Hofer 250b1c2bbc Rename src/ to plugins/ folder 2026-02-27 20:19:46 +01:00