Generated banner for Binlog Failure Analysis
Generated logo for Binlog Failure Analysis

Binlog Failure Analysis

.NET (Microsoft)OfficialPublished by .NET (Microsoft)

  • Skill
  • Review and audit
  • Software development
  • MIT
  • No issues found

From the author

Analyze MSBuild binary logs to diagnose build failures. USE FOR: build errors that are unclear from console output, diagnosing cascading failures across multi-project builds, tracing MSBuild target execution order, and generally any MSBuild build issues. Requires an existing .binlog file. DO NOT USE FOR: generating binlogs (use binlog-generation), binlog MCP startup or connection failures (use troubleshoot-binlog-mcp), non-MSBuild build systems.
— the description by .NET (Microsoft)

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a structured approach to analyzing MSBuild build failures using binary log (.binlog) files. It prioritizes the use of the binlog MCP server to interact with binary data directly, allowing for efficient inspection of properties, targets, and embedded source files without manual parsing. It includes a fallback workflow for environments where the MCP server is unavailable, ensuring build issues can be diagnosed even in restricted settings.

What it does

  • Queries MSBuild binary logs for build errors and warnings.
  • Inspects MSBuild properties, items, and project evaluation data.
  • Traces target execution order to identify failure points.
  • Retrieves embedded source files directly from the binlog.
  • Provides a fallback text-based replay method for environments without MCP support.

When to use it

  • When build errors are unclear from standard console output.
  • When diagnosing cascading failures in complex multi-project builds.
  • When you need to trace the execution order of MSBuild targets.
  • When you need to inspect project configuration state during a failed build.

Advantages

  • Avoids manual parsing of massive, unreadable binary files.
  • Enables deep inspection of build state and properties.
  • Works even when original project files are missing from the disk.
  • Provides a clear, systematic path for root cause analysis.

Usage examples

“Analyze build.binlog to find why the CoreCompile target failed.”
The agent uses the MCP tools to query the binlog, identifies the specific error code, and reports the property values that caused the compilation failure.
“I have a binlog, but the MCP server is down. How do I find the errors?”
The agent provides the command to replay the binlog into a text file and suggests grep patterns to isolate the relevant error messages.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/dotnet/binlog-failure-analysis/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip binlog-failure-analysis.zip -d .agents/skills

Documentation by .NET (Microsoft)

Analyzing MSBuild Failures with Binary Logs

This skill diagnoses MSBuild build failures from a .binlog file. The preferred path uses the binlog MCP server (Microsoft.AITools.BinlogMcp, exposed under the binlog MCP namespace) which is bundled with this plugin. If the MCP server is not available, use troubleshoot-binlog-mcp to diagnose startup when repair is wanted. If repair is blocked, declined, or unnecessary for this task, continue with the binlog replay workflow at the bottom.

Primary workflow — binlog MCP

The MCP server exposes structured tools for inspecting a .binlog without parsing text logs. Call them directly instead of replaying the binlog to a text file. Call tools/list for the MCP first if you are unsure which tools are available.

Important constraints:

  • The .binlog file is a binary format — do NOT try to cat, head, strings, or read it directly. Use only the MCP tools to query it.

  • The original source/project files might or might NOT be available on disk. Project files (.csproj, .props, .targets, App.config, etc.) - if you cannot locate them on disk, they can only be read from within the binlog via MCP tools (e.g., embedded/source file retrieval).

  • Synthesize findings as you go. Do not spend all available time investigating — once you have enough evidence, present your conclusions. A partial answer with clear reasoning is better than timing out mid-investigation.

Use the available MCP server tools to query the binary log for:

  • Build errors and warnings

  • MSBuild properties and their values

  • MSBuild items (PackageReference, ProjectReference, etc.)

  • Project evaluation data

  • Target execution details

  • File contents embedded in the binlog

Fallback workflow — text-log replay (when MCP is unavailable)

Use this only when the MCP server cannot be started (for example, on an older SDK or in an offline environment).

Replay the binlog to text logs
dotnet msbuild build.binlog -noconlog \
  -fl  "-flp:v=diag;logfile=full.log;performancesummary" \
  -fl1 "-flp1:errorsonly;logfile=errors.log" \
  -fl2 "-flp2:warningsonly;logfile=warnings.log"

PowerShell note: Use -flp:"v=diag;logfile=full.log;performancesummary" (quoted semicolons).

Search the text logs
cat errors.log
grep -n -B2 -A2 "CS0246" full.log
grep -i "CoreCompile.*FAILED\|Build FAILED\|error MSB" full.log
grep 'Target "CoreCompile"' full.log | grep -oP 'project "[^"]*"'

Generating a binlog (only if none exists)

dotnet build /bl:build.binlog

Files

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an MCP server

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
.NET (Microsoft)
Publisher
.NET (Microsoft) (Official)
Source
dotnet/skills · plugins/dotnet-msbuild/skills/binlog-failure-analysis · commit 96c3d68
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by .NET (Microsoft).

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download binlog-failure-analysis.zip