Route gh-aw workflow design/create/debug/upgrade requests to the right prompts.
日本語の概要は準備中です。原文の説明を表示しています。
Remove repeated NuGet restores from multi-step .NET builds safely. USE FOR: build/test/publish steps that each restore, Directory.Build.rsp with -restore, safe restore suppression, NETSDK1004/NETSDK1047 after --no-restore. DO NOT USE FOR: slow first restore, only one restore, version or lock errors, unranked build slowness (use build-perf-baseline).
インストールする前に、エージェントに与えられる指示の中身を確認できます。
A no-op restore still evaluates every project and checks restore state, so each extra restore in a multi-step build costs seconds to tens of seconds in a large repo. The cure is easy to get wrong: --no-restore on a step that no earlier restore actually covered turns a slow build into a failed one. This skill finds which invocations restore, proves which are already covered, and changes only those.
dotnet/msbuild steps and the log shows restore output in more than one of themDetermining projects to restore...Directory.Build.rsp or the active MSBuild installation's MSBuild.rsp contains -restore--no-restore or -restore:false can safely be addedNETSDK1004 or NETSDK1047 appeared after --no-restore was addedbuild-perf-baseline, then build-perf-diagnosticsDiscover repository inputs in the working directory; do not ask the user for paths.
*.yml, .github/workflows, azure-pipelines*.yml, Jenkinsfile) and build scripts (build.cmd, build.sh, build.ps1, eng/)Directory.Build.rsp, Directory.Build.props/.targets, NuGet.configMSBuild.rsp beside the active MSBuild executable, or response files passed explicitly with @file. A repository-local MSBuild.rsp is not auto-loadedDetermining projects to restore... or All projects are up-to-date for restore. once per invocation.MSBuildRestoreSessionId and ExcludeRestorePackageImports=true; the Target Performance Summary lists Restore with N calls.| Invocation | Restores? |
|---|---|
dotnet build, test, publish, pack | Implicitly, unless --no-restore; also check inherited rsp flags |
dotnet run | Implicitly before building; --no-restore can still inherit rsp restore on older SDKs. With --no-build, no build or restore runs |
dotnet test, publish, pack with --no-build | No implicit restore, but an rsp -restore can still enable restore; add --no-restore -restore:false |
dotnet msbuild, msbuild.exe, CI MSBuild tasks | With -restore or -t:Restore, including flags inherited from repository Directory.Build.rsp or installation-level MSBuild.rsp, even when a step looks build-only |
dotnet restore, nuget restore, msbuild -t:Restore | Explicit restore |
| CI build task with a "restore packages" option | Check its default |
Starting with .NET SDK 9.0.1xx, --no-restore forwards -restore:false to override rsp flags; older SDKs can still inherit -restore despite skipping the CLI's implicit restore. Whenever an rsp enables restore, use the version-independent --no-restore -restore:false with dotnet build, test, publish or pack, even with --no-build. dotnet msbuild and msbuild.exe take -restore:false, not --no-restore.
dotnet run does not expose the MSBuild -restore:false override. With an rsp on older SDKs, first build using dotnet build --no-restore -restore:false, then run using dotnet run --no-build with the same project, configuration, framework and runtime inputs (or execute the built DLL directly). Passing -restore:false to dotnet run is not a restore-suppression strategy.
Keep the first restore. Skip a later one only when all four checks pass:
| Check | If it fails |
|---|---|
Same project set. A restore covers its entry project or solution and that project's ProjectReference closure. It does not cover a project in another solution or .slnf, a tool built from another path, or a project an orchestrating .proj builds through the MSBuild task (-restore on the orchestrator leaves those unrestored and they fail with NETSDK1004) | Keep restore on that step, or add the project to the explicit restore step |
Same restore inputs. -r/--runtime, RID-producing -a/--arch, --os, --ucr/--use-current-runtime, TargetFramework(s), RuntimeIdentifier(s), PublishAot, package sources (--source, --configfile, RestoreSources), RestorePackagesPath, and any -p: value a PackageReference condition reads. Architecture/OS options combine with the SDK's current RID; --use-current-runtime selects it. Missing RID targets fail with NETSDK1047 (Assets file ... doesn't have a target for 'net10.0/linux-x64') | Match the effective RID in the explicit restore (for example publish --os linux --arch x64 requires restore -r linux-x64), or keep restore on the later step. A generic restore does not cover these aliases merely because there is no -r. Do not require SelfContained=true on restore solely because publish is self-contained: RID-only restore covers ordinary SDK projects. Match Configuration or SelfContained only if repository conditions change package inputs |
Same available restore state. Earlier project.assets.json files must exist where the later invocation looks for them. Match --artifacts-path, UseArtifactsOutput/ArtifactsPath, and MSBuildProjectExtensionsPath/BaseIntermediateOutputPath; another job or workspace does not automatically share these files | Align the explicit restore's output layout with build/test, or retain restore in the later workspace. For build --artifacts-path artifacts --no-restore, use restore --artifacts-path artifacts first; ordinary obj/ assets do not cover that layout |
Nothing changes packages in between. A step that generates or edits a project, runs dotnet add package, rewrites Directory.Packages.props or NuGet.config invalidates the earlier restore | Move the explicit restore after that step |
--no-restore, -restore:false or --no-build on later steps.dotnet test steps over one solution: build once, then dotnet test --no-build on each. Add --no-restore -restore:false if an rsp enables restore, including on .NET 8 and earlier. --no-restore alone still rebuilds.publish --no-build still needs a prior build with matching configuration, framework, RID and self-contained output; restore compatibility does not prove that build outputs exist.-restore in Directory.Build.rsp, because developers rely on it; pass -restore:false per invocation instead.--locked-mode gate, keep it there.# One restore carries every input later steps use
dotnet restore MyApp.sln -r linux-x64
# Explicit overrides also work when an rsp enables restore on older SDKs
dotnet build MyApp.sln -c Release --no-restore -restore:false
dotnet test MyApp.sln -c Release --no-build --no-restore -restore:false
dotnet publish src/Api -c Release -r linux-x64 --no-restore -restore:false
# msbuild invocations need the explicit switch if an rsp file adds -restore
dotnet msbuild Packaging.proj -t:Pack -restore:false
obj/, no project.assets.json). A project that was never restored only fails there. YAML syntax or flag-presence checks do not validate restore coverage or test execution. If you cannot run it, say "not validated" and list the steps and projects to confirm.Restore calls (binlog) or Determining projects to restore lines fell from N to the expected count; for a time claim, before/after medians of at least three runs.Explain which steps restored, which earlier restore covers them, what changed, and what remains unvalidated. State whether redundant restores were removed or no change was needed, keeping the required first restore. Use prose or a findings table as appropriate; no fixed table headings or verdict syntax are required.
| Pitfall | Solution |
|---|---|
Adding --no-restore to every command | Apply the Step 3 checks per step |
Missing that an rsp adds -restore to "build-only" msbuild steps | Search for *.rsp before concluding a step does not restore |
Deleting -restore from Directory.Build.rsp | Override per CI invocation; the rsp serves developers |
Orchestrator .proj restored, children not | Restore each child explicitly, or keep restore on the step that builds it |
Publishing with -r, architecture/OS options, or --use-current-runtime after a generic restore | Restore with the same effective runtime identifier, including SDK-host defaults used by the aliases |
| A generator step edits PackageReferences after restore | Restore after the generator |
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Route gh-aw workflow design/create/debug/upgrade requests to the right prompts.
日本語の概要は準備中です。原文の説明を表示しています。
Use a repo-root `.editorconfig` to configure free .NET analyzer and style rules. Use when a .NET repo needs rule severity, code-style options, section layout, or analyzer ownership made explicit. USE FOR: the repo needs a root .editorconfig; analyzer severity and style ownership are unclear; the team wants one source of truth for rule configuration. DO NOT USE FOR: choosing analyzers with no config change; formatting-only execution with no config ownership question. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.
日本語の概要は準備中です。原文の説明を表示しています。
Scans .NET code for ~50 performance anti-patterns across async, memory, strings, collections, LINQ, regex, serialization, and I/O with tiered severity classification. Use when analyzing .NET code for optimization opportunities, reviewing hot paths, or auditing allocation-heavy patterns.
日本語の概要は準備中です。原文の説明を表示しています。
Symbolicate the .NET runtime frames in an Android tombstone file. Extracts BuildIds and PC offsets from the native backtrace, downloads debug symbols from the Microsoft symbol server, and runs llvm-symbolizer to produce function names with source file and line numbers. USE FOR triaging a .NET MAUI or Mono Android app crash from a tombstone, resolving native backtrace frames in libmonosgen-2.0.so or libcoreclr.so to .NET runtime source code, or investigating SIGABRT, SIGSEGV, or other native signals originating from the .NET runtime on Android. DO NOT USE FOR pure Java/Kotlin crashes, managed .NET exceptions that are already captured in logcat, or iOS crash logs. INVOKES Symbolicate-Tombstone.ps1 script, llvm-symbolizer, Microsoft symbol server.
日本語の概要は準備中です。原文の説明を表示しています。
Symbolicate .NET runtime frames in Apple platform .ips crash logs (iOS, tvOS, Mac Catalyst, macOS). Extracts UUIDs and addresses from the native backtrace, locates dSYM debug symbols, and runs atos to produce function names with source file and line numbers. Automatically downloads .dwarf symbols from the Microsoft symbol server using Mach-O UUIDs. USE FOR triaging a .NET MAUI or Mono app crash from an .ips file on any Apple platform, resolving native backtrace frames in libcoreclr or libmonosgen-2.0 to .NET runtime source code, retrieving .ips crash logs from a connected iOS device or iPhone, or investigating EXC_CRASH, EXC_BAD_ACCESS, SIGABRT, or SIGSEGV originating from the .NET runtime. DO NOT USE FOR pure Swift/Objective-C crashes with no .NET components, or Android tombstone files. INVOKES Symbolicate-Crash.ps1 script, atos, dwarfdump, idevicecrashreport.
日本語の概要は準備中です。原文の説明を表示しています。
Design or review .NET solution architecture across modular monoliths, clean architecture, vertical slices, microservices, DDD, CQRS, and cloud-native boundaries without over-engineering. USE FOR: .NET architecture choices; layer and domain boundary review; service decomposition; clean architecture, vertical slice, DDD, CQRS, and modular monolith decisions. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.
日本語の概要は準備中です。原文の説明を表示しています。