binlog-failure-analysis

Diagnose MSBuild build failures by querying binary log files.

Updated Jul 12, 2026
One-click install
npx skills add https://github.com/Patrick-Rex/DotNetTechSamples --skill binlog-failure-analysis-patrick-rex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: binlog-failure-analysis
Source: https://github.com/Patrick-Rex/DotNetTechSamples/tree/main/.agents/plugins/dotnet-msbuild/skills/binlog-failure-analysis
Command: npx skills add https://github.com/Patrick-Rex/DotNetTechSamples --skill binlog-failure-analysis-patrick-rex

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? MSBuild build failures often produce console output that is too terse or too noisy to explain the root cause, especially in multi-project solutions where errors cascade. This Skill analyzes an existing .binlog file to pinpoint errors, warnings, target execution order, and project evaluation data. ## Core Features & Use Cases - Structured binlog inspection: Query errors, warnings, MSBuild properties, items, and target execution through the binlog MCP server instead of parsing raw text. - Text-log replay fallback: Replay the binlog into full, errors-only, and warnings-only text logs when the MCP server is unavailable, then grep for specific error codes like CS0246. - Embedded file retrieval: Read project files (.csproj, .props, .targets) embedded in the binlog even when the original sources are not on disk. - Use Case: A CI build fails with cascading errors across 20 projects. Provide the build.binlog file and get a diagnosis of which project failed first, which target failed, and why. ## Quick Start Analyze the attached build.binlog file and tell me which project failed first and what caused the build error.

Frequently Asked Questions about binlog-failure-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze an MSBuild binlog file for build errors?

Provide the .binlog file and the skill queries it through the binlog MCP server for errors, warnings, properties, and target execution details. If the MCP server is unavailable, it replays the binlog into text logs and searches them with grep.

How do I generate a binlog file for MSBuild?

Run dotnet build with the /bl:build.binlog flag to produce a binary log. This skill focuses on analysis of an existing binlog; generation is a separate step handled by the binlog-generation skill.

Can I read a .binlog file directly as text?

No, .binlog is a binary format and cannot be read with cat, head, or strings. Use the binlog MCP tools to query it, or replay it to text logs with dotnet msbuild -fl flags.

What if the original project files are not available on disk?

Project files such as .csproj, .props, and .targets can be retrieved from within the binlog itself via the MCP server's embedded file retrieval tools, so analysis still works without the original sources.

When should I not use binlog failure analysis?

Do not use it for non-MSBuild build systems or when no .binlog file exists yet. It is designed specifically for diagnosing MSBuild and dotnet build failures from binary logs.