Infra, Ops & WorkflowSûr100100/100
Binlog Analysis (.NET)
Triage a build / compile / restore / WarnAsError failure from its MSBuild binary log. Fetches the binlog (a local build's, or a failed dotnet/fsharp Azure DevOps PR build's published artifact) and analyzes it live via the `binlog-mcp` MCP server — structured errors, root-cause diagnosis, and an MSBuild perf X-ray. NOT for test failures or CheckCodeFormatting: a build binlog has no errors there.
ou envoie-le directement à ton agent.
Installer dans ton projet
$ curl -fsSL https://arboristhree.xyz/cli/install-skill.mjs -o /tmp/arboris-install-skill.mjs && node /tmp/arboris-install-skill.mjs binlog-analysis__dotnet-dotnet__src-fsharp-github-skills-41013e95e9c4.NET
dotnet/dotnet
Contenu à copier
---
name: binlog-analysis
description: >-
Triage a build / compile / restore / WarnAsError failure from its MSBuild
binary log. Fetches the binlog (a local build's, or a failed dotnet/fsharp
Azure DevOps PR build's published artifact) and analyzes it live via the
`binlog-mcp` MCP server — structured errors, root-cause diagnosis, and an
MSBuild perf X-ray. NOT for test failures or CheckCodeFormatting: a build
binlog has no errors there.
metadata:
origin: .NET
---
# Binlog Analysis (via the binlog-mcp MCP server)
Boil a failed build down to root causes. This skill does two small things and
delegates the heavy lifting to an MCP server:
1. **Fetch** the build's `*.binlog` — from your local build, or from a failed
`fsharp-ci` Azure DevOps PR build (downloads the published artifact).
2. **Hand the path to the `binlog-mcp` MCP server** (`Microsoft.AITools.BinlogMcp`),
which queries the binlog live (≈38 tools): structured errors, categorized root
causes, and an MSBuild X-ray (target/task/analyzer timings, incrementality,
double-writes, …).
Because the analysis lives in the MCP server, this skill stays tiny — and gets
better automatically as that server gains features.
## When to use
- A local build (with `-bl`) or a failed `fsharp-ci` PR build broke and you need
to know **why** — compile / restore / analyzer / WarnAsError errors, or build
perf.
## When NOT to use
- **Test** failures or **CheckCodeFormatting**. The build binlog has no errors in
that case: `binlog_overview` will show the build succeeded / 0 errors — stop and
use `pr-build-status` / `flaky-test-detector` instead.
## Step 1 — get the binlog path
```pwsh
# Local: newest *.binlog under <repo>/artifacts/log (build first, e.g. ./build.sh --binaryLog)
pwsh .github/skills/binlog-analysis/scripts/Get-Binlog.ps1
# Local: a specific file, directory, or glob
pwsh .github/skills/binlog-analysis/scripts/Get-Binlog.ps1 -BinlogPath artifacts/log/Debug/Build.binlog
# Azure DevOps: latest FAILED fsharp-ci build for a PR (downloads + keeps the binlog)
pwsh .github/skills/binlog-analysis/scripts/Get-Binlog.ps1 -PrNumber 19941
# Azure DevOps: explicit build id; -AllLegs for every leg; -Json for a path list
pwsh .github/skills/binlog-analysis/scripts/Get-Binlog.ps1 -BuildId 1462217 -Json
```
It prints the resolved `*.binlog` path(s) (Azure DevOps artifacts are downloaded
to a temp folder and kept so the MCP can read them).
## Step 2 — analyze via the binlog-mcp MCP tools
With each path, call the MCP server (the argument is `binlog_file`):
- `binlog_overview` — build status + error/warning counts. **Call this first** to
decide whether there's anything to analyze.
- `binlog_diagnose` — categorized root causes + next-step hints.
- `binlog_errors` / `binlog_warnings` — structured diagnostics (code / file / line
/ column / project).
- `binlog_search` — free-form drill-down.
- Perf: `binlog_expensive_targets` / `binlog_expensive_tasks` /
`binlog_expensive_analyzers`, `binlog_incremental_analysis`,
`binlog_double_writes`, `binlog_target_graph`.
> **Multi-targeting note.** Today `binlog_errors` returns one row per target
> framework, so a single source error in a multi-TFM project (e.g.
> FSharp.Compiler.Service → `net10.0;netstandard2.0`) appears once per TFM. A
> lossless dedup (`code,file,line` → set of TFMs) is proposed upstream in
> `dotnet-microsoft/ai-tools`; when it lands, this skill gets the deduped view for
> free — no change here.
## Prerequisites
- The **binlog-mcp MCP server** registered with your agent. The tool is pinned in
the repo's `.config/dotnet-tools.json` (`Microsoft.AITools.BinlogMcp`); run
`dotnet tool restore` once, then register it as an MCP server. For example,
Copilot CLI (`~/.copilot/mcp-config.json`):
```jsonc
{ "mcpServers": { "binlog-mcp": {
"command": "dotnet", "args": ["tool", "run", "binlog-mcp"],
"tools": ["*"], "deferTools": "auto" } } }
```
(gh-aw: a `mcp-servers:` block; VS Code: `.vscode/mcp.json`. Telemetry is on by
default — opt out with `DOTNET_CLI_TELEMETRY_OPTOUT=1` if desired.)
- PowerShell 7+ (`pwsh`) and a .NET 10 SDK (already required by the repo).
- Azure DevOps modes need network access to `dev.azure.com`.Colle ce Markdown dans ton agent ou utilise les boutons ci-dessus pour l’écrire dans ton projet.
Ce que fait Binlog Analysis (.NET)
A local build (with `-bl`) or a failed `fsharp-ci` PR build broke and you need
**Test** failures or **CheckCodeFormatting**. The build binlog has no errors in
`binlog_overview` — build status + error/warning counts. **Call this first** to
`binlog_diagnose` — categorized root causes + next-step hints.
Comment utiliser Binlog Analysis (.NET)
1
Copie le prompt
Un clic copie le prompt packagé (ou l'envoie à ton agent).
2
L'agent installe le skill
Il ajoute le SKILL.md et ses ressources à ton projet.
3
Activation automatique
Le skill s'active dès que le contexte correspond.
Déclencheurs pour Binlog Analysis (.NET)
Dis simplement à ton agent quelque chose comme :
Applique le skill binlog-analysis__dotnet-dotnet__src-fsharp-github-skills-41013e95e9c4 à cette tâche
Utilise binlog-analysis__dotnet-dotnet__src-fsharp-github-skills-41013e95e9c4 pour améliorer cette implémentation
Passe en revue ce sujet avec binlog-analysis__dotnet-dotnet__src-fsharp-github-skills-41013e95e9c4
Skills liés à Binlog Analysis (.NET)
Add CLI Command (.NET)
Add or change a dotnet CLI command, subcommand, or option across the relevant CLI projects. USE FOR: adding or changing a dotnet CLI command/subcommand, adding a new Option<T> or Argument<T>, registering a subcommand in the command tree, changing an option's help description or a command's runtime message, wiring a command parser, or updating --help output.Add Dotnet Aot Command (.NET)
Add, enable, or review a dotnet CLI command or feature in the Native AOT CLI (src/Cli/dotnet-aot) and prove its compatibility. USE FOR: migrating a command or option to AOT, reviewing an AOT migration PR, defining conservative eligibility and managed fallback, changing AotSourceFiles.props or AotDependencies.props, validating AOT/managed parity, NativeAOT-publishing tests, checking binary-size impact, or using the dn harness and separated SDK layout. DO NOT USE FOR: resolving IL trim/AOT analyzer warnings alone (use dotnet-aot-compat), running dotnet.Tests incrementally (use incremental-test), or pure managed CLI work.Add Net Analyzer (.NET)
Add, port, or change a .NET code analysis rule (CA####) under src/Microsoft.CodeAnalysis.NetAnalyzers. USE FOR: implementing a new CA analyzer and its code fixer, porting a rule or PR from the retired dotnet/roslyn-analyzers repo, allocating a diagnostic ID from DiagnosticCategoryAndIdRanges.txt, choosing RuleLevel/severity/category, wiring resx + xlf strings, recording the rule in AnalyzerReleases.Unshipped.md, regenerating the analyzer documentation/sarif files, and writing MSTest analyzer/code-fix tests with the VerifyCS/VerifyVB harness. DO NOT USE FOR: NETSDK#### MSBuild diagnostics (src/Tasks), CS####/BC#### compiler diagnostics or IDE#### analyzers (dotnet/roslyn), or CONTAINER#### diagnostics (src/Containers).