MSBuild Binlog Analyzer for VS Code
Analyze MSBuild binary logs (.binlog) with GitHub Copilot Chat and MCP tools — right from VS Code.
Preview — This extension is under active development. Feedback welcome — please report issues at dotnet/skills.
Quick Start
- Install this extension (requires VS Code with the GitHub Copilot Chat extension and the .NET SDK; VS Code enforces the minimum version from the extension manifest)
- Open a
.binlog — via Binlog: Load File (Ctrl+Shift+P), Build & Collect Binlog, or from Structured Log Viewer → Open in VS Code
- Use
@binlog in Copilot Chat:
@binlog why did the build fail?
@binlog what are the slowest targets?
@binlog /perf
The Microsoft.AITools.BinlogMcp server (the MCP binlog analysis tools) is auto-installed on first use.
What You Get
| Feature |
Description |
| @binlog Chat |
Ask Copilot about errors, performance, targets, imports, NuGet issues — with slash commands like /errors, /perf, /timeline, /compare, /summary, /incremental, /buildcheck, /search, /targets, /properties, /items, /propertyhistory |
| Build & Collect |
Build a project and capture a .binlog in one step |
| Binlog Explorer |
Sidebar tree with project → target → task hierarchy, errors, warnings, performance |
| Build Timeline |
Visual bar charts of target/task durations with click-to-analyze in Copilot |
| Fix All Issues |
Copilot fixes all build errors/warnings, rebuilds, and loads before/after for comparison |
| Auto-fix Diagnostic |
Right-click any error/warning in the tree → "Auto-fix with Copilot" to fix it directly |
| Optimize Build |
Pick optimizations, Copilot applies changes, verify with A/B comparison |
| Build Analysis Mode |
Chat mode pre-configured with Microsoft.AITools.BinlogMcp MCP tools — works with any agent |
| Language Model Tools |
binlog_lm_overview, binlog_lm_errors, binlog_lm_search, binlog_lm_perf, binlog_lm_compare — available to @workspace, agent mode, and custom chat modes |
| CI/CD Integration |
Download binlogs from Azure DevOps Pipelines and GitHub Actions — filter by branch or PR |
| Problems Panel |
Build diagnostics as native VS Code errors/warnings with per-project CodeLens and "Ask @binlog" CodeActions |
| Search |
Search across all build events — targets, tasks, messages, properties |
Build Baseline & Regressions
A build baseline is a saved .binlog snapshot that newly-loaded builds are automatically compared against, so you can spot regressions (slower targets, new errors/warnings, changed properties). If you see "No build baseline is set.", pick one of these:
Set a baseline (any one):
- Binlog Explorer → right-click a loaded
.binlog → Set This Binlog as Baseline (baselines the file you right-clicked).
- Command Palette (
Ctrl+Shift+P) → Binlog: Set This Binlog as Baseline — when invoked without a tree-item context, baselines the currently active binlog.
Once set, the active binlog is compared to the baseline automatically and a Build: status-bar item (bottom-left) reflects the result.
View regressions:
- Click the Build: status-bar item, or
- Command Palette → Binlog: Show Build Regressions (focuses the regression results in the Binlog Explorer).
Clear a baseline:
- Command Palette → Binlog: Clear Build Baseline, or right-click the baseline/regressions node in the explorer → Clear Build Baseline.
Tip: a typical loop is — load a known-good build and Set This Binlog as Baseline, make a change, rebuild via Build & Collect Binlog, then read the regressions that surface automatically.
Configuration
| Setting |
Default |
Description |
binlogAnalyzer.mcpServerPath |
"" |
Custom path to the MCP server executable |
binlogAnalyzer.mcpServerArgs |
"--binlog ${binlog}" |
Argument template for the MCP server. ${binlog} is replaced with each binlog path |
binlogAnalyzer.autoLoad |
true |
Auto-load binlog diagnostics on activation |
binlogAnalyzer.diagnosticsSeverityFilter |
"Warning" |
Min severity for Problems panel |
binlogAnalyzer.inlineDecorations |
true |
Show build errors as inline decorations in source files |
binlogAnalyzer.chat.includeAllTools |
false |
Expose all available tools (file editing, terminal, other MCPs) to the @binlog chat participant |
binlogAnalyzer.chat.additionalToolPatterns |
[] |
Additional tool name patterns to include alongside binlog tools (e.g. ["copilot_codebase", "terminal"]) |
binlogAnalyzer.tree.topItemsLimit |
10 |
Number of expensive targets/tasks/items to request and show before "Load more" |
binlogAnalyzer.mcp.requestTimeoutMs |
30000 |
Base MCP request timeout; large binlogs get an adaptive size-based extension |
binlogAnalyzer.buildCheck.timeoutMs |
120000 |
BuildCheck analysis timeout |
binlogAnalyzer.diagnostics.autoRunBuildCheck |
false |
Automatically run BuildCheck analysis when a binlog is loaded (requires .NET SDK 9.0.100+) |
binlogAnalyzer.diagnostics.propertyTrackingLevel |
15 |
MSBuild property-tracking level used when rebuilding with property tracking. 15 = all events |
binlogAnalyzer.ci.maxRuns |
20 |
Maximum recent CI runs to fetch |
binlogAnalyzer.ci.watch |
false |
Watch the current branch or PR's latest CI run and offer to analyze binlogs when it fails |
binlogAnalyzer.ci.pollSeconds |
60 |
Base polling interval (seconds) for CI watch; the watcher backs off when idle or unfocused |
binlogAnalyzer.ciPathMappings |
[] |
Path-prefix mappings for CI/remote binlogs, e.g. D:\a\1\s → the local workspace root |
binlogAnalyzer.regression.minDeltaMs |
200 |
Minimum target duration increase (ms) to flag as a build regression |
binlogAnalyzer.regression.minDeltaPct |
15 |
Minimum target duration increase (%) to flag as a build regression |
binlogAnalyzer.regression.failOnNewWarnings |
false |
Treat newly added warnings as build regressions |
Telemetry
This extension collects usage data and sends it to Microsoft to help improve
our products and services. The extension respects the
telemetry.telemetryLevel setting — learn more at
https://code.visualstudio.com/docs/getstarted/telemetry. To disable
telemetry in VS Code, including telemetry from this extension, set:
"telemetry.telemetryLevel": "off"
What is sent. Every extension-defined event and property is enumerated
in the bundled telemetry.json using the standard 1DS classification
schema (classification, endPoint, purpose); the VS Code telemetry
library also adds its standard common properties (including pseudonymized
machine and session identifiers). At a glance:
- Feature insight — extension activation, command invocation, chat
participant / slash-command usage, tree navigation, binlog-loaded count.
- Performance & reliability — MCP tool-install success/failure, build
check duration, error counts. Error messages are never sent as raw text:
they are hashed with HMAC-SHA256 (16-char hex) — identical to the C#
Binlog MCP server's
Hash — and only the error kind (exception.type,
e.g. TypeError) is sent in clear. Every event also carries
binlog.build_version, matching the MCP server's conventions.
What is not sent. No .binlog content, no file system paths, no
source-code snippets, no Copilot Chat conversation text, no user
identifiers beyond VS Code's pseudonymized machine- and session-id hashes.
Read the Microsoft privacy statement
to learn more.
Development: MCP Contract
The extension vendors the Binlog MCP JSON Schemas under src/contract/schemas/ and commits generated TypeScript declarations in src/contract/.
npm run gen:contract # regenerate src/contract/*.d.ts from vendored schemas
npm run check:contract # regenerate and fail if generated files drift
When server schemas change, copy the new *.schema.json files into src/contract/schemas/, run npm run gen:contract, and commit both schemas and generated types.
Troubleshooting: MCP Server Installation
The extension auto-installs Microsoft.AITools.BinlogMcp via dotnet tool install -g. In corporate environments with restricted NuGet feeds, this may fail. Here are the workarounds:
1. Install with explicit feed source
dotnet tool install -g Microsoft.AITools.BinlogMcp --prerelease --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json
2. Diagnose NuGet issues
dotnet nuget list source
Common problems:
- dotnet-public feed not configured — the tool is published on the dotnet-public Azure DevOps feed
- Authenticated feed requires credentials — may block access to the feed
- Package source mapping excludes the dotnet-public feed for this package
3. Verify installation
dotnet tool list -g | Select-String Microsoft.AITools.BinlogMcp
binlog-mcp --help
License
See the bundled LICENSE.md for the Microsoft Software License Terms.
When you hit a problem and want to share details with us, all relevant
diagnostic information lives in VS Code's Output panel. Open
View → Output and switch the dropdown to one of:
| Output channel |
What it contains |
Binlog Analyzer |
Extension activity: file loads, tree refreshes, command execution. |
Binlog Analyzer Telemetry |
A local mirror of every telemetry event the extension emits (with names + properties), printed before the event is sent. Useful for verifying exactly what would be reported. |
MCP: Microsoft.AITools.BinlogMcp |
The MCP server's stdout/stderr — protocol handshake, tool invocations, any server-side errors. |
Before sharing logs publicly
Output channels may contain file paths, project property values, and
environment-variable values that MSBuild surfaces into the log. Before
posting a log on a GitHub issue or chat:
- Search for and redact secrets (tokens, connection strings, passwords).
- Search-and-replace your user home directory with
~ (the extension
already does this for error strings it sends as telemetry, but the
on-disk Output panel still contains the raw values).
- If you're sharing a
.binlog, consider opening it in
MSBuild Structured Log Viewer
and using its "Redact secrets" feature first.
For private reports (security vulnerabilities or anything you'd rather
not put on a public issue), follow the process in the bundled SECURITY.md.