maintaining-binary-log-compatibility

Installation
SKILL.md

Binary Log Considerations

The binary log (.binlog) is MSBuild's primary diagnostic format and source of truth for build analysis. It captures the complete build event stream with full fidelity. Format changes have strict compatibility requirements.

For general binary log usage, see Binary-Log.md.

Core Principles

  1. The binlog captures everything. All meaningful build events must be represented. If your change alters build behavior, it must be observable in the binlog.
  2. Format changes must be backward-compatible. Older versions of MSBuild Structured Log Viewer and other tools must be able to read binlogs produced by newer MSBuild, at minimum gracefully degrading.
  3. Forward compatibility matters too. Newer viewers should handle binlogs from older MSBuild without crashing, even if some events are unrecognized.

Architecture Overview

Build Engine
  → BuildEventArgs (structured events)
    → BinaryLogger (serializes to .binlog)
      → ProjectImportsCollector (embeds project/targets files)
Related skills

More from dotnet/msbuild

Installs
2
Repository
dotnet/msbuild
GitHub Stars
5.5K
First Seen
Mar 20, 2026