check-bin-obj-clash
Fungsinya
Skill ini menemukan proyek MSBuild yang folder output atau intermediate-nya tumpang tindih, yang bisa membuat build gagal atau menimpa file. Skill ini untuk pengembang yang melihat error file sedang digunakan atau kegagalan build yang tidak menentu.
Kapan dipakai
- โSaat build gagal dengan pesan bahwa file sudah ada atau sedang digunakan.
- โSaat build kadang gagal tetapi berhasil saat diulang.
- โSaat output hilang atau tertimpa di solusi dengan beberapa proyek.
Link skill
https://github.com/dotnet/skills/blob/main/plugins/dotnet-msbuild/skills/check-bin-obj-clash/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
โBuild solusi saya gagal dengan error file sudah ada saat restore. Cari proyek mana yang memakai folder yang sama.โ
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent memeriksa pengaturan folder output dan intermediate setiap proyek, mencari tumpang tindih, lalu melaporkan proyek mana yang bentrok dan alasannya.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
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 sameIntermediateOutputPathwhereproject.assets.jsonis 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 skill immediately when you see:
Cannot create a file when that file already existsduring NuGet restoreThe process cannot access the file because it is being used by another process- Intermittent build failures that succeed on retry
- Missing output files or unexpected overwriting
Step 1: Generate a Binary Log
Use the binlog-generation skill to generate a binary log with the correct naming convention.
Primary workflow โ binlog MCP
The MCP server exposes structured tools for inspecting a .binlog without
parsing text logs. Call them directly instead of replaying the binlog to a text
file. Call tools/list for the MCP first if you are unsure which tools are available.
Important constraints:
- The
.binlogfile is a binary format โ do NOT try tocat,head,strings, or read it directly. Use only the MCP tools to query it. - Synthesize findings as you go. Do not spend all available time investigating โ once you have enough evidence, present your conclusions.
Step 2: Get an overview and list projects
Use the MCP overview and projects tools to understand the build and list all projects that participated.
Step 3: Check evaluations and global properties
Use the MCP evaluations and evaluation_global_properties tools to find all evaluations per project. Look for:
- Multiple evaluations for the same project (indicates multi-targeting or multiple build configurations)
- Differing global properties between evaluations (
TargetFramework,Configuration,RuntimeIdentifier,SolutionFileName,PublishReadyToRun, etc.)
Step 4: Get output paths for each evaluation
Use the MCP properties tool to query OutputPath, IntermediateOutputPath, BaseOutputPath, and BaseIntermediateOutputPath for each project evaluation.
Step 5: Check for double writes
Use the MCP double_writes tool if available โ it directly detects files written by multiple project instances.
Step 6: Identify clashes
Compare the OutputPath and IntermediateOutputPath values across all evaluations:
- Normalize paths - Convert to absolute paths and normalize separators
- Group by path - Find evaluations that share the same OutputPath or IntermediateOutputPath
- Filter out non-build evaluations - Exclude
BuildProjectReferences=falseinstances (P2P queries) - Report clashes - Any group with more than one evaluation indicates a clash
Fallback workflow โ text-log replay (when MCP is unavailable)
Use this only when the MCP server cannot be started.
Replay the binlog to a diagnostic text log, then grep for the same signals the MCP tools surface:
dotnet msbuild build.binlog -noconlog -fl "-flp:v=diag;logfile=full.log"
Then extract the clash signals:
- Projects & evaluations โ list evaluation starts and count them per project:
grep 'Evaluation started' full.log | grep -oiE '"[^"]+\.[a-z]+proj"' | sort | uniq -c. Matching the full quoted path keeps same-named projects in different directories distinct (and tolerates spaces in paths); a path with a count โฅ 2 was evaluated more than once (multi-targeting or extra global properties). (grep -calone only totals evaluations across the whole log, so it can't reveal per-project duplication.) - Output paths โ `gr
Pertanyaan umum
Error apa yang dibantu skill ini?
Skill ini membantu error seperti file sedang digunakan atau file sudah ada saat restore.
Apakah skill ini mengubah file proyek saya?
Skill ini melaporkan bentrokannya, dan perubahan dilakukan setelah Anda meninjaunya.
Apakah skill ini mencakup multi-targeting?
Ya. Build multi-target juga bisa menyebabkan bentrokan meskipun nama framework tidak ada di jalurnya.
Detail
Deskripsi asli dari pembuat
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
repo: dotnet/skills
Popularitas
- Bintang GitHub
- 5.8k
- Peringkat
- #14595
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- โฆ
Skill lain dari repositori ini
create-custom-agent
5.8kMembantu agent Anda membuat file agen kustom VS Code dengan alatnya sendiri, instruksi, dan serah terima ke agent lain.
create-skill
5.8kMembantu agent Anda membuat skill agent baru dengan nama yang valid, deskripsi pemicu yang jelas, dan file SKILL.md yang mengikuti standar.
csharp-scripts
5.8kMembantu agent Anda menjalankan program C# kecil sebagai satu file dengan alat baris perintah .NET, tanpa membuat proyek lengkap.
dotnet-pinvoke
5.8kMembantu agent Anda memanggil pustaka native C atau C++ dari .NET dengan benar, mencakup tanda tangan, penanganan string, memori, dan safe handle.
Skill serupa
openclaw-update
394kMembantu agent Anda memperbarui OpenClaw Gateway yang sudah ada, dengan memilih metode pembaruan yang sesuai cara pemasangannya dan menjaga sesi Anda tetap berjalan.
diagnose-gateway
394kMembantu agent Anda mencari tahu mengapa OpenClaw Gateway gagal dengan memeriksa pengaturan, channel, dan port tanpa mengubah apa pun.
crabbox-apps
394kMembantu agent Anda membuka dan menjalankan aplikasi di mesin cloud sementara, lalu menampilkan tampilannya di panel samping chat Anda.