Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guides changes to MSBuild binary log infrastructure. Consult when modifying BinaryLogger or BinaryLogReplayEventSource, adding new BuildEventArgs types, changing event serialization/deserialization, modifying ProjectImportsCollector, adjusting message importance levels, or making changes that affect .binlog content. Also applies when verifying that behavioral changes are properly reflected in binary log output.
.claude/skills/dotnet-maintaining-binary-log-compatibility/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 44% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 18% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -6% | 0% |
| case-17 | ✗→✓ | ▲ Improved | -32% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 19% | 0% |
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.
Build Engine
→ BuildEventArgs (structured events)
→ BinaryLogger (serializes to .binlog)
→ ProjectImportsCollector (embeds project/targets files)
Replay:
.binlog file
→ BinaryLogReplayEventSource (deserializes)
→ Any ILogger (console, structured log viewer, analyzers)Key source files:
src/Build/Logging/BinaryLogger/BinaryLogger.cs — the logger itselfsrc/Framework/BuildEventArgs.cs — base class for all build eventssrc/Build/Logging/BinaryLogger/ProjectImportsCollector.cs — captures imported filesWhen adding a new BuildEventArgs subclass:
BuildMessageEventArgs, BuildWarningEventArgs, etc.)WriteToStream and CreateFromStream, then trace the event through every dispatcher and transport (including task-host forwarding) without making unknown event types fatalcsharp// Pattern for backward-compatible field addition if (logVersion >= newFieldVersion) { writer.Write(newField); } // Reading with backward compatibility if (logVersion >= newFieldVersion) { newField = reader.ReadString(); } else { newField = defaultValue; }
Importance controls what appears in console output, but everything goes to binlog regardless of importance.
| Level | Use For | Console Verbosity | |-------|---------|------------------| | High | Critical user-facing information | Minimal and above | | Normal | Standard build progress | Normal and above | | Low | Detailed diagnostic information | Detailed and above | | Diagnostic | Internal debugging | Diagnostic only |
Normal for user-relevant informationLow for information useful when debugging but noisy in normal buildsHigh is reserved for important warnings/status — use sparinglyLow insteadThe ProjectImportsCollector embeds all imported .props, .targets, and project files into the binlog. This enables the "preprocessed view" in log viewers.
MSBUILDLOGIMPORTS=1 (or the /bl switch) enables import collectionWhen modifying MSBuild behavior, verify binlog impact:
| Change Type | Binlog Consideration | |------------|---------------------| | New property set during evaluation | Appears in PropertyInitialValue or PropertyReassignment events | | New target added | Produces TargetStarted/TargetFinished events | | Changed task behavior | Task output items/properties captured in TaskFinished | | New warning/error | Captured as BuildWarningEventArgs/BuildErrorEventArgs | | Modified import chain | Changes which files ProjectImportsCollector captures |
BinaryLogReplayEventSource in tests to verify binlog content programmaticallyWriteToStream/CreateFromStream implementations| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-12 | pass→pass | 16,610 | 5,323 | -68% | 1 | 1 | 0% | 2,254 | 2,148 | -5% | 0 | 0 | — |
case-01 | fail→fail | 22,949 | 22,744 | -1% | 1 | 1 | 0% | 3,681 | 4,276 | +16% | 0 | 0 | — |
case-02 | fail→pass | 19,297 | 18,645 | -3% | 1 | 1 | 0% | 2,948 | 4,250 | +44% | 0 | 0 | — |
case-03 | fail→pass | 25,895 | 22,476 | -13% | 1 | 1 | 0% | 3,983 | 4,709 | +18% | 0 | 0 | — |
case-04 | pass→fail | 19,135 | 21,170 | +11% | 1 | 1 | 0% | 3,713 | 5,079 | +37% | 0 | 0 | — |
case-05 | pass→pass | 18,492 | 19,620 | +6% | 1 | 1 | 0% | 3,001 | 4,587 | +53% | 0 | 0 | — |
case-06 | pass→pass | 12,795 | 12,611 | -1% | 1 | 1 | 0% | 2,461 | 3,506 | +42% | 0 | 0 | — |
case-07 | pass→fail | 12,453 | 9,144 | -27% | 1 | 1 | 0% | 2,129 | 2,784 | +31% | 0 | 0 | — |
case-08 | pass→pass | 15,256 | 9,271 | -39% | 1 | 1 | 0% | 2,540 | 2,818 | +11% | 0 | 0 | — |
case-09 | pass→pass | 12,755 | 4,789 | -62% | 1 | 1 | 0% | 2,064 | 2,023 | -2% | 0 | 0 | — |
case-10 | pass→pass | 5,944 | 6,054 | +2% | 1 | 1 | 0% | 987 | 2,299 | +133% | 0 | 0 | — |
case-11 | fail→pass | 12,081 | 3,237 | -73% | 1 | 1 | 0% | 1,947 | 1,833 | -6% | 0 | 0 | — |
case-13 | pass→pass | 14,773 | 3,283 | -78% | 1 | 1 | 0% | 2,750 | 1,671 | -39% | 0 | 0 | — |
case-14 | pass→pass | 15,624 | 6,867 | -56% | 1 | 1 | 0% | 2,215 | 2,228 | +1% | 0 | 0 | — |
case-15 | pass→pass | 12,944 | 6,904 | -47% | 1 | 1 | 0% | 2,077 | 2,391 | +15% | 0 | 0 | — |
case-16 | pass→pass | 5,692 | 2,542 | -55% | 1 | 1 | 0% | 767 | 1,665 | +117% | 0 | 0 | — |
case-17 | fail→pass | 14,835 | 2,417 | -84% | 1 | 1 | 0% | 2,279 | 1,541 | -32% | 0 | 0 | — |
case-18 | fail→pass | 12,356 | 7,080 | -43% | 1 | 1 | 0% | 1,920 | 2,277 | +19% | 0 | 0 | — |
case-19 | pass→pass | 6,373 | 1,614 | -75% | 1 | 1 | 0% | 1,138 | 1,435 | +26% | 0 | 0 | — |
case-20 | pass→pass | 6,493 | 1,887 | -71% | 1 | 1 | 0% | 1,108 | 1,508 | +36% | 0 | 0 | — |
case-21 | pass→pass | 19,849 | 17,679 | -11% | 1 | 1 | 0% | 2,932 | 4,200 | +43% | 0 | 0 | — |
case-22 | pass→pass | 11,230 | 3,527 | -69% | 1 | 1 | 0% | 1,987 | 1,779 | -10% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +14 percentage points is the difference between those two pass rates over the 22 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
The publisher has shipped newer versions since this run, so these numbers describe v1, not the version currently listed.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.