msbuild
Что он делает
Этот скилл — отправная точка для проблем MSBuild в проектах .NET. Он помогает устранять ошибки сборки, анализировать медленные сборки и проверять файлы сборки, а затем применяет точечные рекомендации для каждого случая. Он нужен разработчикам с проблемами сборки, которые они не могут объяснить.
Когда использовать
- ✓Когда сборка .NET не проходит и причина не ясна из текста ошибки.
- ✓Когда сборка медленная, и вы хотите узнать, какие шаги занимают больше всего времени.
- ✓Когда вам нужен совет по пользовательским файлам сборки, хукам импорта или точкам расширения сборки.
Ссылка на скилл
https://github.com/dotnet/skills/blob/main/plugins/dotnet/skills/msbuild/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Моё решение .NET не собирается, и текст ошибки не объясняет почему. Найди причину.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Агент определяет, относится ли задача к устранению неполадок, производительности или проверке, читает подходящее руководство и проверяет реальный проект и данные сборки, прежде чем предложить исправление.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с GitHub.
MSBuild troubleshooting
This is the entry skill. Choose troubleshooting, performance, or authoring review, then read only the relevant local references. The references retain the content and identities of the original MSBuild skills, with correctness fixes; they are not separate skills to activate.
Start with the task and evidence
For tasks that need a checkout, discover the relevant project/solution, shared build files, SDK selection, and repository build instructions in the current workspace. Preserve the original command, working directory, configuration, target framework, runtime identifier, global properties, and target. Ask only for consequential information that cannot be discovered.
An existing .binlog can be the only available artifact. Analyze it before requesting a new
build; paths inside it do not prove a checkout exists locally. For a self-contained static review
or advisory question, use the supplied XML and relevant references; do not require a checkout,
restore, build, or binlog.
For a mixed request, fix correctness before measuring successful builds, and keep authoring review separate from a performance experiment. A failing test assertion after a successful build is not an MSBuild failure.
1. Troubleshoot build issues
Goal: identify the independent root causes and make the smallest repair, not a broad cleanup.
| Situation | Read | Action |
|---|---|---|
| A build failed and a binary log exists | binlog-failure-analysis | Replay the log with MSBuild; connect errors to the responsible project instance, target, and task. Separate root causes from cascading failures. |
| The failure needs evidence and no matching log exists | binlog-generation, then failure analysis | Capture the original invocation once, verify the artifact, and analyze it. |
| A project/build file has incorrect conditions, items, properties, or output paths | msbuild-antipatterns | Select the relevant catalog entries and check their exceptions before changing anything. |
| Imports or build hooks are missing, overwritten, or run in the wrong order | extension-points | Inspect the import contract, discovery order, and packed NuGet layout rather than hiding a required failure. |
| Outputs are stale or required work is skipped | incremental-build | Prove which input, output, timestamp, item, or condition makes the decision wrong. Correctness takes priority over speed. |
After a repair, rerun the original failing scenario and check affected dependents. If only a log is available, provide an evidence-backed proposed fix and say it was not applied or rebuilt. Do not turn a targeted failure investigation into solution-wide authoring cleanup.
2. Diagnose and improve build performance
Goal: measure the reported scenario, identify its bottleneck, change one cause, and compare equivalent builds without losing required behavior.
- Reuse matching measurements. If they are missing, establish the relevant baseline before editing configuration; do not time a failed build as a successful baseline.
- Classify evaluation versus target/task execution. Inclusive target totals and dependency waits are not additive wall time or proof of CPU utilization.
- Follow the measured branch below. Do not apply every optimization in every reference.
- Repeat the same scenario, command, input change, and instrumentation. Report spread/noise and correctness checks; an isolated faster run is not proof of improvement.
| Situation | Read | Keep distinct |
|---|---|---|
| No trustworthy before/after measurements, or a baseline/controlled optimization is requested | build-perf-baseline | Cold-output, warm changed-input, and no-change builds; restore/cache state; ordinary Build versus forced Rebuild. |
| The expensive work is not yet identified, or compiler/analyzer/reference/restore time dominates | build-perf-diagnostics | Actual task cost versus orchestration waits, overlapping durations, and missing instrumentation. |
| Time is spent before target execution, in globs, imports, or property evaluation | eval-performance | Evaluation versus execution; legitimate versus acciden |
Частые вопросы
Он переводит старые проекты на формат SDK?
Нет. Миграцию старого проекта выполняет другой скилл.
Нужен ли ему мой код на компьютере?
Для проблемы с проектом он смотрит рабочее пространство. Для проверки переданного XML сборки он работает только с этим текстом.
Он вносит минимальное изменение?
Да. Он предпочитает минимальное исправление, которое устраняет первопричину.
Подробности
Оригинальное описание автора
Use only for MSBuild failure investigation, build-performance analysis, or review of existing build XML/extension contracts. A plan to convert a working legacy/non-SDK project to SDK style or migrate packages.config is a project-system migration, NOT a build-file review: do not activate, even to check scope. Framework/API upgrades are also excluded. Activate for advisory Import/Exists hook and NuGet packed-import questions even without a checkout or failed build; .csproj/.fsproj/.vbproj/.props/.targets conditions; custom-target inputs/outputs; .binlog capture/replay; failing dotnet build/resto
repo: dotnet/skills
Популярность
- Звёзды на GitHub
- 5.8k
- Место в рейтинге
- #14653
- Лицензия
- MIT
- Обновлён
- 02.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
create-custom-agent
5.8kПомогает агенту создавать файлы пользовательских агентов для VS Code со своими инструментами, инструкциями и передачей работы другим агентам.
create-skill
5.8kПомогает агенту создать новый скилл с корректным именем, понятным описанием триггера и файлом SKILL.md по стандарту.
csharp-scripts
5.8kПомогает агенту запустить небольшую программу на C# как один файл с помощью командного инструмента .NET, без создания полного проекта.
dotnet-pinvoke
5.8kПомогает агенту правильно вызывать нативные библиотеки C и C++ из .NET: сигнатуры, работу со строками, память и безопасные дескрипторы.
Похожие скиллы
openclaw-update
394kПомогает агенту обновить уже работающий OpenClaw Gateway, выбрав способ обновления по тому, как он был установлен, и сохранив вашу сессию.
diagnose-gateway
394kПомогает агенту выяснить, почему ваш OpenClaw Gateway не работает, проверяя настройки, каналы и порты, но ничего не меняя.
crabbox-apps
394kПомогает агенту открыть и запустить приложение на временной облачной машине, а затем показать его вид на боковой панели чата.