check-bin-obj-clash

Detects MSBuild projects sharing conflicting OutputPath or IntermediateOutputPath directories.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/Netcodr81/kinetic-reports --skill check-bin-obj-clash-netcodr81
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: check-bin-obj-clash
Source: https://github.com/Netcodr81/kinetic-reports/tree/main/.github/skills/check-bin-obj-clash
Command: npx skills add https://github.com/Netcodr81/kinetic-reports --skill check-bin-obj-clash-netcodr81

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? MSBuild builds fail intermittently with errors like "Cannot create a file when that file already exists" or "file is being used by another process" when multiple project evaluations write to the same bin/obj output directories. This Skill diagnoses those clashes by analyzing binary build logs. ## Core Features & Use Cases - Binlog-based clash detection: Queries a .binlog via MCP tools (evaluations, global properties, double_writes) to find evaluations sharing OutputPath or IntermediateOutputPath. - Root cause catalog: Covers multi-targeting without TargetFramework in path, shared BaseIntermediateOutputPath across projects, multi-solution builds, redundant global properties like PublishReadyToRun, and SetTargetFramework misuse. - Concrete fixes: Provides XML snippets for each cause, such as AppendTargetFrameworkToOutputPath, unique per-project obj paths, and RemoveGlobalProperties on ProjectReference. - Use Case: A CI build intermittently fails NuGet restore with "Cannot create a file when that file already exists". Use this Skill to inspect the binlog, discover two projects share the same IntermediateOutputPath where project.assets.json is written, and apply the per-project obj path fix. ## Quick Start Analyze my build.binlog file and tell me which MSBuild projects have conflicting OutputPath or IntermediateOutputPath values and how to fix them.

Frequently Asked Questions about check-bin-obj-clash

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

FAQPage Schema
How do I find MSBuild projects sharing the same output path?▼

Generate a binary log of the build, then query each project evaluation's OutputPath and IntermediateOutputPath using binlog MCP tools. Normalize paths to absolute form, group evaluations by path, and any group with more than one evaluation is a clash.

Why does NuGet restore fail with 'Cannot create a file when that file already exists'?▼

This error indicates multiple projects share the same IntermediateOutputPath where project.assets.json is written during parallel restore. Each project must have a unique BaseIntermediateOutputPath; AppendTargetFrameworkToOutputPath alone cannot fix cross-project intermediate path clashes.

Does AppendTargetFrameworkToOutputPath fix all bin/obj clashes?▼

No. It fixes multi-targeting clashes within a single project, but files like project.assets.json are written directly to IntermediateOutputPath without the framework suffix. Cross-project clashes require unique per-project intermediate directories.

Can I read a .binlog file directly to diagnose build issues?▼

No, .binlog is a binary format that cannot be read with cat or grep. Use the binlog MCP tools to query it, or replay it to a diagnostic text log with dotnet msbuild build.binlog -flp:v=diag and grep the text output.

When should SetTargetFramework on a ProjectReference be removed?▼

Remove it when it re-injects the same TFM a single-targeting project already declares, since that is path-neutral and forks a redundant instance sharing the output path. It is legitimate for multi-targeting references or overriding to a different TFM.