跳到正文
Skillpedia
部署与云(DevOps)5.8k · #14607

resolve-project-references

它能做什么

这项技能说明,.NET 构建报告中的 ResolveProjectReferences 步骤通常显示的是等待时间,而不是实际工作,并指出真正的减速原因。适合在缓慢的构建报告顶部看到该步骤的开发者。

适用场景

  • ✓当 ResolveProjectReferences 在构建性能摘要中显示为最耗时的步骤时。
  • ✓当开发者想直接加速 ResolveProjectReferences 时。
  • ✓当某个步骤似乎占用了大部分构建时间,而你需要确认这是否属实的时候。

技能链接

https://github.com/dotnet/skills/blob/main/plugins/dotnet-msbuild/skills/resolve-project-references/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/dotnet/skills/blob/main/plugins/dotnet-msbuild/skills/resolve-project-references/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我的构建报告显示 ResolveProjectReferences 占用了大部分时间。我应该优化那一步吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会解释,报告的时间包括等待其他项目构建的时间,然后把你指向真正执行工作的步骤。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Misleading ResolveProjectReferences Time

Prevent misguided optimization of ResolveProjectReferences by explaining that its reported time is wall-clock wait time, not CPU work.

When to Use

  • ResolveProjectReferences appears as the most expensive target in the Target Performance Summary
  • A developer is trying to optimize ResolveProjectReferences directly
  • Build performance analysis shows a single target consuming 50-80% of total build time

When Not to Use

  • General build performance optimization (use build-perf-diagnostics instead)
  • The bottleneck is clearly a different target (e.g., Csc, ResolveAssemblyReference)
  • The user has not yet captured a binlog or performance summary

Inputs

Input Required Description
Build log or binlog Yes A diagnostic build log or binlog containing the Target Performance Summary

Workflow

Step 1: Confirm the misleading symptom

Verify that ResolveProjectReferences appears as the top target in the Target Performance Summary. This is the misleading metric.

Step 2: Explain why it is misleading

The reported time includes waiting for dependent projects to build while the MSBuild node is yielded (see dotnet/msbuild#3135). During this wait, the node may be doing useful work on other projects. The target itself does very little work.

Step 3: Redirect to task self-time

Use the Task Performance Summary to identify the real bottleneck.

Primary: binlog MCP (preferred)

Use the binlog MCP server expensive_tasks tool to get task self-time rankings directly from the binlog.

Fallback: text-log replay (when MCP is unavailable)

dotnet msbuild build.binlog -noconlog -fl "-flp:v=diag;logfile=full.log;performancesummary"
grep "Task Performance Summary" -A 50 full.log

Focus on self-time of actual tasks:

  • Csc: see build-perf-diagnostics skill (Section 2: Roslyn Analyzers)
  • ResolveAssemblyReference: see build-perf-diagnostics skill (Section 1: RAR)
  • Copy: see build-perf-diagnostics skill (Section 4: File I/O)
  • Serialization bottlenecks: see build-parallelism skill

Validation

  • Task Performance Summary was used instead of Target Performance Summary
  • ResolveProjectReferences was not set as the optimization target
  • A concrete task (e.g., Csc, Copy, ResolveAssemblyReference) was identified as the true bottleneck
常见问题

这一步总是不重要的吗?

这项技能说明它报告的时间具有误导性,因为该步骤本身在等待期间几乎不做什么工作。

我应该看什么?

这项技能指向任务自身耗时,它显示每个步骤自己真正做的工作。

这是一份通用的构建速度指南吗?

不是。关于通用构建性能,单独的诊断技能更合适。

详情

作者的原始描述

Guide for interpreting ResolveProjectReferences time in MSBuild performance summaries. Activate when ResolveProjectReferences appears as the most expensive target and developers are trying to optimize it directly. Explains that the reported time includes wait time for dependent project builds and is misleading. Guides users to focus on task self-time instead. Do not activate for general build performance -- use build-perf-diagnostics instead.

repo: dotnet/skills

热度

GitHub 星标
5.8k
排名
#14607
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能