aspire-orchestration

Manage Aspire AppHost lifecycle and recover from file locks and port conflicts.

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/Hexalith/Hexalith.Parties --skill aspire-orchestration-hexalith
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aspire-orchestration
Source: https://github.com/Hexalith/Hexalith.Parties/tree/main/.agents/skills/aspire-orchestration
Command: npx skills add https://github.com/Hexalith/Hexalith.Parties --skill aspire-orchestration-hexalith

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? AI agents working in Aspire projects often cause file locks, orphaned processes, and port conflicts by running dotnet run or dotnet build against a live AppHost. This Skill enforces safe Aspire CLI workflows so agents start, wait on, inspect, and stop orchestrated apps without breaking the developer environment. ## Core Features & Use Cases - Safe Lifecycle Management: Enforces aspire start, aspire wait, aspire stop, and aspire ps instead of dotnet run, curl polling, or manual process kills. - File-Lock Recovery: Provides a deterministic recovery sequence for MSB3491 and CS2012 build errors caused by Aspire holding output assemblies. - Project Detection: Fingerprints C#, file-based C#, and TypeScript AppHosts via SDK references, apphost.ts, aspire.config.json, and .aspire/ directories. - Use Case: An agent hits error MSB3491 while building a service. Instead of deleting bin/ or declaring the project broken, it runs aspire stop, rebuilds, and restarts with aspire start. ## Quick Start Ask the agent to start your Aspire app in the background and wait until the API resource is ready before running tests.

Frequently Asked Questions about aspire-orchestration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I start an Aspire app from an AI agent?

Use `aspire start` to run the AppHost in the background, never `dotnet run` on the AppHost project. In git worktrees, add `--isolated` to avoid port conflicts, and add `--non-interactive` for agent terminals.

How do I fix MSB3491 or CS2012 file lock errors in Aspire?

Run `aspire stop` first to release the locks Aspire holds on bin/ and obj/ outputs, then rebuild or run `aspire start` again. Never delete bin/obj, kill dotnet processes, or assume the project has a permanent build failure.

Should I use aspire run or aspire start?

Use `aspire start` for background execution, which is the correct choice for AI agents. `aspire run` runs in the foreground with a terminal dashboard and blocks the terminal, so it suits human developers only.

How do I detect whether a project uses Aspire?

Look for `Aspire.AppHost.Sdk` in a .csproj, an `apphost.cs` file with a `#:sdk Aspire.AppHost.Sdk` directive, or an `apphost.ts` file. Secondary signals include `aspire.config.json`, a `.aspire/` directory, and `Aspire.ServiceDefaults` references.

Why does aspire wait reject my resource name?

The `aspire wait` command expects the resource `displayName`, not the `name` field. Run `aspire ps --format Json` and pass the `displayName` value to `aspire wait`.

When should I not restart the whole Aspire AppHost?

When only one resource's implementation changed, prefer resource-scoped commands like `aspire resource <name> rebuild` or the framework's own watch and hot reload. Full restarts are only needed when AppHost code or configuration changes.