Token导航 LogoToken导航

Agent Skill · 研究检索

check-bin-obj-clash(检查 bin obj 冲突)

check-bin-obj-clash 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

check-bin-obj-clash 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 20,356。

总安装 5,242周安装 210GitHub Stars 1,497下载 1,697核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:check-bin-obj-clash(检查 bin obj 冲突)
来源仓库:https://github.com/dotnet/skills
仓库路径:skills/check-bin-obj-clash
安装命令:
npx skills add https://github.com/dotnet/skills --skill check-bin-obj-clash
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dotnet/skills --skill check-bin-obj-clash

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

check-bin-obj-clash 检测多个 MSBuild 项目是否存在 OutputPath 或 IntermediateOutputPath 冲突。常见于并行构建失败、文件占用或 NuGet 恢复异常等问题排查。识别不同来源的项目间路径重叠,辅助调整构建设置避免竞争条件。

需具备项目文件读取权限,建议在干净构建环境中运行以防干扰。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/check-bin-obj-clash

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dotnet/skills --skill check-bin-obj-clash;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

check-bin-obj-clash 怎么安装?

在终端执行 npx skills add https://github.com/dotnet/skills --skill check-bin-obj-clash。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

check-bin-obj-clash 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

check-bin-obj-clash 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

check-bin-obj-clash 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

check-bin-obj-clash 用的人多吗?

公开数据是累计安装 5,242 次,近一周安装 210 次,下载 1,697 次,GitHub 1,497 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

check-bin-obj-clash 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 来源仓库有 1,497 星,维护活跃度相对可查。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
check-bin-obj-clash

检查 bin obj 冲突 · 本页

5,2421,497只读未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

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 skill immediately when you see:

  • Cannot create a file when that file already exists during NuGet restore
  • The 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.

Step 2: Replay the Binary Log to Text

dotnet msbuild build.binlog -noconlog -fl -flp:v=diag;logfile=full.log

Step 3: List All Projects

grep -i 'done building project\|Building project' full.log | grep -oP '"[^"]+\.csproj"' | sort -u

This lists all project files that participated in the build.

Step 4: Check for Multiple Evaluations per Project

Multiple evaluations for the same project indicate multi-targeting or multiple build configurations:

# Count how many times each project was evaluated
grep -c 'Evaluation started' full.log
grep 'Evaluation started.*\.csproj' full.log

Step 5: Check Global Properties for Each Evaluation

For each project, query the build properties to understand the build configuration:

# Search the diagnostic log for evaluated property values
grep -i 'TargetFramework\|Configuration\|Platform\|RuntimeIdentifier' full.log | head -40

Look for properties like TargetFramework, Configuration, Platform, and RuntimeIdentifier that should differentiate output paths.

Also check solution-related properties to identify multi-solution builds:

  • SolutionFileName, SolutionName, SolutionPath, SolutionDir, SolutionExt — differ when a project is built from multiple solutions
  • CurrentSolutionConfigurationContents — the number of project entries reveals which solution an evaluation belongs to (e.g., 1 project vs ~49 projects)

Look for extra global properties that don't affect output paths but create distinct MSBuild project instances:

  • PublishReadyToRun — a publish setting that doesn't change OutputPath or IntermediateOutputPath, but MSBuild treats it as a distinct project instance, preventing result caching and causing redundant target execution (e.g., CopyFilesToOutputDirectory running again)
  • Any other global property that differs between evaluations but doesn't contribute to path differentiation

Filter Out Non-Build Evaluations

When analyzing clashes, filter evaluations based on the type of clash you're investigating:

  1. For OutputPath clashes: Exclude restore-phase evaluations (where MSBuildRestoreSessionId global property is set). These don't write to output directories.
  2. For IntermediateOutputPath clashes: Include restore-phase evaluations, as NuGet restore writes project.assets.json to the intermediate output path.
  3. Always exclude BuildProjectReferences=false: These are P2P metadata queries, not actual builds that write files.

Step 6: Get Output Paths for Each Project

Query each project's output path properties:

# From the diagnostic log - search for OutputPath assignments
grep -i 'OutputPath\s*=\|IntermediateOutputPath\s*=\|BaseOutputPath\s*=\|BaseIntermediateOutputPath\s*=' full.log | head -40

# Or query a specific project directly
dotnet msbuild MyProject.csproj -getProperty:OutputPath
dotnet msbuild MyProject.csproj -getProperty:IntermediateOutputPath
dotnet msbuild MyProject.csproj -getProperty:BaseOutputPath
dotnet msbuild MyProject.csproj -getProperty:BaseIntermediateOutputPath

Step 7: Identify Clashes

Compare the OutputPath and IntermediateOutputPath values across all evaluations:

  1. Normalize paths - Convert to absolute paths and normalize separators
  2. Group by path - Find evaluations that share the same OutputPath or IntermediateOutputPath
  3. Report clashes - Any group with more than one evaluation indicates a clash

Step 8: Verify Clashes via CopyFilesToOutputDirectory (Optional)

As additional evidence for OutputPath clashes, check if multiple project builds execute the CopyFilesToOutputDirectory target to the same path. Note that not all clashes manifest here - compilation outputs and other targets may also conflict.

# Search for CopyFilesToOutputDirectory target execution per project
grep 'Target "CopyFilesToOutputDirectory"' full.log

# Look for Copy task messages showing file destinations
grep 'Copying file from\|SkipUnchangedFiles' full.log | head -30

Look for evidence of clashes in the messages:

  • Copying file from "..." to "..." - Active file writes
  • Did not copy from file "..." to file "..." because the "SkipUnchangedFiles" parameter was set to "true" - Indicates a second build attempted to write to the same location

The SkipUnchangedFiles skip message often masks clashes - the build succeeds but is vulnerable to race conditions in parallel builds.

Step 9: Check CoreCompile Execution Patterns (Optional)

To understand which project instance did the actual compilation vs redundant work, check CoreCompile:

grep 'Target "CoreCompile"' full.log

Compare the durations:

  • The instance with a long CoreCompile duration (e.g., seconds) is the primary build that did the actual compilation
  • Instances where CoreCompile was skipped (duration ~0-10ms) are redundant builds — they didn't recompile but may still run other targets like CopyFilesToOutputDirectory that write to the same output directory

This helps distinguish the "real" build from redundant instances created by extra global properties or multi-solution builds.

Caveat: Multi-Solution Builds

When analyzing multi-solution builds, note that the diagnostic log interleaves output from all projects. To determine which solution a project instance belongs to, search for SolutionFileName property assignments in the diagnostic log:

grep -i "SolutionFileName\|CurrentSolutionConfigurationContents" full.log | head -20

Expected Output Structure

For each evaluation, collect:

  • Project file path
  • Evaluation ID
  • TargetFramework (if multi-targeting)
  • Configuration
  • OutputPath
  • IntermediateOutputPath

Clash Detection Logic

For each unique OutputPath:
  - If multiple evaluations share it → CLASH

For each unique IntermediateOutputPath:
  - If multiple evaluations share it → CLASH

Common Causes and Fixes

Multi-targeting without TargetFramework in path

Problem: Project uses TargetFrameworks but OutputPath doesn't vary by framework.

<!-- BAD: Same path for all frameworks -->
<OutputPath>bin\$(Configuration)\</OutputPath>

Fix: Include TargetFramework in the path:

<!-- GOOD: Path varies by framework -->
<OutputPath>bin\$(Configuration)\$(TargetFramework)\</OutputPath>

Or rely on SDK defaults which handle this automatically:

<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
<AppendTargetFrameworkToIntermediateOutputPath>true</AppendTargetFrameworkToIntermediateOutputPath>

Shared output directory across projects (CANNOT be fixed with AppendTargetFramework)

Problem: Multiple projects explicitly set the same BaseOutputPath or BaseIntermediateOutputPath.

<!-- Project A - Directory.Build.props -->
<BaseOutputPath>..\SharedOutput\</BaseOutputPath>
<BaseIntermediateOutputPath>..\SharedObj\</BaseIntermediateOutputPath>

<!-- Project B - Directory.Build.props -->
<BaseOutputPath>..\SharedOutput\</BaseOutputPath>
<BaseIntermediateOutputPath>..\SharedObj\</BaseIntermediateOutputPath>

IMPORTANT: Even with AppendTargetFrameworkToOutputPath=true, this will still clash!.NET writes certain files directly to the IntermediateOutputPath without the TargetFramework suffix, including:

  • project.assets.json (NuGet restore output)
  • Other NuGet-related files

This causes errors like Cannot create a file when that file already exists during parallel restore.

Fix: Each project MUST have a unique BaseIntermediateOutputPath. Do not share intermediate output directories across projects:

<!-- Project A -->
<BaseIntermediateOutputPath>..\obj\ProjectA\</BaseIntermediateOutputPath>

<!-- Project B -->
<BaseIntermediateOutputPath>..\obj\ProjectB\</BaseIntermediateOutputPath>

Or simply use the SDK defaults which place obj inside each project's directory.

RuntimeIdentifier builds clashing

Problem: Building for multiple RIDs without RID in path.

Fix: Ensure RuntimeIdentifier is in the path:

<AppendRuntimeIdentifierToOutputPath>true</AppendRuntimeIdentifierToOutputPath>

Multiple solutions building the same project

Problem: A single build invokes multiple solutions (e.g., via MSBuild task or command line) that include the same project. Each solution build evaluates and builds the project independently, with different Solution* global properties that don't affect the output path.

How to detect: Compare SolutionFileName and CurrentSolutionConfigurationContents across evaluations for the same project. Different values indicate multi-solution builds. For example:

PropertyEval from Solution AEval from Solution B
SolutionFileNameBuildAnalyzers.slnMain.slnx
CurrentSolutionConfigurationContents1 project entry~49 project entries
OutputPathbin\Release\netstandard2.0\bin\Release\netstandard2.0\ ← clash

Example: A repo build script builds BuildAnalyzers.sln then Main.slnx, and both solutions include SharedAnalyzers.csproj. Both builds write to bin\Release\netstandard2.0\. The first build compiles; the second skips compilation but still runs CopyFilesToOutputDirectory.

Fix: Options include:

  1. Consolidate solutions - Ensure each project is only built from one solution in a single build
  2. Use different configurations - Build solutions with different Configuration values that result in different output paths
  3. Exclude duplicate projects - Use solution filters or conditional project inclusion to avoid building the same project twice

Extra global properties creating redundant project instances

Problem: A project is built multiple times within the same solution due to extra global properties (e.g., PublishReadyToRun=false) that create distinct MSBuild project instances. These properties don't affect output paths but prevent MSBuild from caching results across instances, causing redundant target execution.

How to detect: Compare global properties across evaluations for the same project within the same solution (same SolutionFileName). Look for properties that differ but don't contribute to path differentiation:

PropertyEval A (from Razor.slnx)Eval B (from Razor.slnx)
PublishReadyToRun*(not set)*false
OutputPathbin\Release\netstandard2.0\bin\Release\netstandard2.0\ ← clash

This is particularly wasteful for projects where the extra property has no effect (e.g., PublishReadyToRun on a netstandard2.0 class library that doesn't use ReadyToRun compilation).

Fix: Options include:

  1. Remove the extra global property - Investigate which parent target/task is injecting the property and prevent it from being passed to projects that don't need it
  2. Use RemoveGlobalProperties metadata - On ProjectReference items, use RemoveGlobalProperties="PublishReadyToRun" to strip the property before building the referenced project
  3. Condition the property - Only set the property on projects that actually use it (e.g., only for executable projects, not class libraries)

Example Workflow

# 1. Replay the binlog
dotnet msbuild build.binlog -noconlog -fl -flp:v=diag;logfile=full.log

# 2. List projects
grep 'done building project' full.log | grep -oP '"[^"]+\.csproj"' | sort -u

# 3. Check OutputPath for each evaluation
grep -i 'OutputPath\s*=' full.log | sort -u
# e.g.  OutputPath = bin\Debug\net8.0\
#       OutputPath = bin\Debug\net9.0\

# 4. Check IntermediateOutputPath
grep -i 'IntermediateOutputPath\s*=' full.log | sort -u
# e.g.  IntermediateOutputPath = obj\Debug\net8.0\
#       IntermediateOutputPath = obj\Debug\net9.0\

# 5. Compare paths → No clash (paths differ by TargetFramework)

Tips

  • Use grep -i 'OutputPath\s*=' full.log | sort -u to quickly find all OutputPath property assignments
  • Check BaseOutputPath and BaseIntermediateOutputPath as they form the root of output paths
  • The SDK default paths include $(TargetFramework) - clashes often occur when projects override these defaults
  • Remember that paths may be relative - normalize to absolute paths before comparing
  • Cross-project IntermediateOutputPath clashes cannot be fixed with AppendTargetFrameworkToOutputPath - files like project.assets.json are written directly to the intermediate path
  • For multi-targeting clashes within the same project, AppendTargetFrameworkToOutputPath=true is the correct fix
  • Common error messages indicating path clashes:

- Cannot create a file when that file already exists (NuGet restore) - The process cannot access the file because it is being used by another process - Intermittent build failures that succeed on retry

Global Properties to Check When Comparing Evaluations

When multiple evaluations share an output path, compare these global properties to understand why:

PropertyAffects OutputPath?Notes
TargetFrameworkYesDifferent TFMs should have different paths
RuntimeIdentifierYesDifferent RIDs should have different paths
ConfigurationYesDebug vs Release
PlatformYesAnyCPU vs x64 etc.
SolutionFileNameNoIdentifies which solution built the project — different values indicate multi-solution clash
SolutionNameNoSolution name without extension
SolutionPathNoFull path to the solution file
SolutionDirNoDirectory containing the solution file
CurrentSolutionConfigurationContentsNoXML with project entries — count of entries reveals which solution
BuildProjectReferencesNofalse = P2P query, not a real build - ignore these
MSBuildRestoreSessionIdNoPresent = restore phase evaluation
PublishReadyToRunNoPublish setting, doesn't change build output path but creates distinct project instances

Testing Fixes

After making changes to fix path clashes, clean and rebuild to verify. See the binlog-generation skill's "Cleaning the Repository" section on how to clean the repository while preserving binlog files.

平台分布

Codex

35.7%
按下载量换算606

Claude

26.92%
按下载量换算457

Cursor

20.08%
按下载量换算341

Gemini CLI

8.54%
按下载量换算145

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills