binlog-generation

Generate MSBuild binary logs by adding the /bl flag to dotnet build commands.

1|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/D1ssolve/craft-agents --skill binlog-generation-d1ssolve
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: binlog-generation
Source: https://github.com/D1ssolve/craft-agents/tree/main/skills/binlog-generation
Command: npx skills add https://github.com/D1ssolve/craft-agents --skill binlog-generation-d1ssolve

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Build failures and performance issues in .NET projects are hard to diagnose without a detailed record of what MSBuild actually did. This Skill ensures every dotnet build, test, pack, publish, or restore command captures a binary log (binlog) so failures can be investigated without re-running the build. ## Core Features & Use Cases - Automatic binlog capture: Adds the /bl:{} flag to any MSBuild-based command so every build produces a diagnostic trace. - Unique file naming: Uses the {} placeholder (MSBuild 17.8+ / .NET 8 SDK+) so each build writes a distinct binlog and never overwrites previous ones, with PowerShell escaping guidance (-bl:{{}}). - Fallback naming and cleanup safety: Provides incrementing filename strategies when {} is unavailable and preserves binlogs during git clean with -e "*.binlog". - Use Case: A CI build fails intermittently. Because every build already ran with /bl:{}, the binlog for the failed run is immediately available for analysis with the binlog-failure-analysis skill instead of reproducing the failure. ## Quick Start Add the /bl:{} flag to my dotnet build command so it generates a binary log for diagnostics.

Frequently Asked Questions about binlog-generation

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

FAQPage Schema
How do I generate a binlog with dotnet build?

Add the /bl:{} flag to your command, for example dotnet build /bl:{}. MSBuild replaces {} with a unique identifier so every build writes a distinct .binlog file without overwriting previous ones.

How to use the /bl flag in PowerShell?

PowerShell interprets braces, so escape them by doubling: dotnet build -bl:{{}}. This produces the same unique-name behavior as /bl:{} in bash or cmd.

What MSBuild version supports the {} placeholder in binlog filenames?

The {} placeholder requires MSBuild 17.8 or later, which ships with the .NET 8 SDK. On older versions, specify an explicit filename that does not collide with existing .binlog files, such as an incrementing number.

Why does dotnet build /bl keep overwriting my binlog?

Using /bl without a filename writes to the same msbuild.binlog every time. Use /bl:{} so MSBuild generates a unique name per build, preserving your full build history for later analysis.

How do I keep binlog files when running git clean?

Exclude binlogs with git clean -fdx -e "*.binlog". Binlog files are usually gitignored, so a plain git clean -fdx would delete them along with other build artifacts.

When should I not use binlog generation?

Do not use it for non-MSBuild build systems such as npm, Maven, or CMake, since /bl is an MSBuild switch. To analyze an existing binlog rather than create one, use a binlog failure analysis tool instead.