Agent skill

check-bin-obj-clash

Detects MSBuild projects with conflicting OutputPath or IntermediateOutputPath. USE FOR: builds failing with 'Cannot create a file when that file already exists', 'The process cannot access the file because it is being used by another process', intermittent build failures that succeed on retry, or missing/overwritten outputs in multi-project or multi-targeting builds where bin/obj (or project.assets.json) collide. Common causes: shared OutputPath, missing AppendTargetFrameworkToOutputPath, extra global properties (e.g. PublishReadyToRun), or SetTargetFramework on a ProjectReference to a single

.NET Platform4,927★ · 1 repos on radarProfile →
claude-codeMIT
Install
npx skills add dotnet/skills --skill check-bin-obj-clash --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 21 KB
Bundled scripts: none
Path: plugins/dotnet-msbuild/skills/check-bin-obj-clash/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 4,927
Language: C#
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Detects MSBuild projects with conflicting OutputPath or IntermediateOutputPath across evaluations, to surface clashes that cause file-in-use or missing/overwritten outputs in multi-project or multi-targeting builds. It guides users to identify when multiple evaluations share the same output directories and how global properties or shared BaseOutputPath/BaseIntermediateOutputPath contribute to clashes. It provides a step-by-step workflow using binary logs and MCP tooling to surface, compare, and report clashes, and offers fixes like ensuring unique intermediate paths or including TargetFramework in OutputPath.

How it works

  • Invoke the skill when you see common MSBuild path-related issues (e.g., Cannot create a file when that file already exists, file-in-use errors, or intermittent failures).
  • Step 1: Generate a Binary Log with binlog-generation.
  • Step 2: Use MCP overview and projects tools to list all participating projects.
  • Step 3: Use MCP evaluations and evaluation_global_properties to find per-project evaluations and differing global properties (TargetFramework, Configuration, RuntimeIdentifier, SolutionFileName, PublishReadyToRun, etc.).
  • Step 4: Use MCP properties to query OutputPath, IntermediateOutputPath, BaseOutputPath, and BaseIntermediateOutputPath for each evaluation.
  • Step 5: If available, use MCP double_writes to detect files written by multiple project instances.
  • Step 6: Compare OutputPath and IntermediateOutputPath across evaluations:
    1. Normalize paths to absolute form
    2. Group by path
    3. Exclude BuildProjectReferences=false evaluations
    4. Report any group with more than one evaluation as a clash
  • Fallback: If MCP is unavailable, replay the binlog to a diagnostic text log and grep signals for evaluations, OutputPath/IntermediateOutputPath, and global properties; identify clashes similarly and exclude non-build evaluations.

When to use it

Use immediately when you encounter build failures or intermittent failures tied to file access or missing outputs, especially in multi-project or multi-targeting scenarios where bin/obj or project.assets.json may collide.

What it can touch

  • The workflow references tools for querying binlogs via MCP (tools/list, evaluations, evaluation_global_properties, properties, double_writes). It does not modify source files or perform builds; it analyzes build metadata produced by prior steps.

Caveats

  • Requires binary logs and MCP tooling to be available; the fallback relies on text-log replay if MCP is unavailable. Do not rely on MCP when it cannot be started. The skill describes how to distinguish same-project vs cross-project publish scenarios and how to interpret global properties in relation to paths.
From the SKILL.md

# Detecting OutputPath and IntermediateOutputPath Clashes ## Overview This skill helps identify when multiple MSBuild project evaluations share the same `OutputPath` or `IntermediateOutputPath`. This is a common source of build failures including: - File access conflicts during parallel builds - Missing or overwritten output files - Intermittent build failures - "File in use" errors - **NuGet restore errors like `Cannot create a file when that file already exists`** - this strongly indicates multiple projects share the same `IntermediateOutputPath` where `project.assets.json` is written Clashes can occur between: - **Different projects** sharing the same output directory - **Multi-targeting builds** (e.g., `TargetFrameworks=net8.0;net9.0`) where the path doesn't include the target framework - **Multiple solution builds** where the same project is built from different solutions in a single build **Note:** Project instances with `BuildProjectReferences=false` should be **ignored** when analyzing clashes - these are P2P reference resolution builds that only query metadata (via `GetTargetPath`) and do not actually write to output directories. ## When to Use This Skill **Invoke this ski

What's inside
Steps it walks through
  1. Overview
  2. When to Use This Skill
  3. Step 1: Generate a Binary Log
  4. Primary workflow — binlog MCP
  5. Step 2: Get an overview and list projects
  6. Step 3: Check evaluations and global properties
  7. Step 4: Get output paths for each evaluation
  8. Step 5: Check for double writes
  9. Step 6: Identify clashes
  10. Fallback workflow — text-log replay (when MCP is unavailable)
  11. Common Causes and Fixes
  12. Multi-targeting without TargetFramework in path
  13. RuntimeIdentifier builds clashing
  14. Multiple solutions building the same project
Commands it runs
dotnet msbuild build.binlog -noconlog -fl -flp:v=diag;logfile=full.log
More from skills
All skills →
About this skill
What does the check-bin-obj-clash skill do?

Detects MSBuild projects with conflicting OutputPath or IntermediateOutputPath. USE FOR: builds failing with 'Cannot create a file when that file already exists', 'The process cannot access the file because it is being used by another process', intermittent build failures that succeed on retry, or missing/overwritten outputs in multi-project or multi-targeting builds where bin/obj (or project.assets.json) collide. Common causes: shared OutputPath, missing AppendTargetFrameworkToOutputPath, extra global properties (e.g. PublishReadyToRun), or SetTargetFramework on a ProjectReference to a single

How do I install it?

Run `npx skills add dotnet/skills --skill check-bin-obj-clash --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From dotnet/skills, a repository with 4,927 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going