aspire-orchestration

Manages Aspire AppHost lifecycle and recovers from file locks, port conflicts, and orphaned processes.

25|4|Updated Dec 21, 2025
One-click install
npx skills add https://github.com/thangchung/agent-engineering-experiment --skill aspire-orchestration-thangchung
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: aspire-orchestration
Source: https://github.com/thangchung/agent-engineering-experiment/tree/main/agentgateway-entraid-obo/.claude/skills/aspire-orchestration
Command: npx skills add https://github.com/thangchung/agent-engineering-experiment --skill aspire-orchestration-thangchung

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? AI agents working in Aspire projects frequently cause file locks (MSB3491, CS2012), port conflicts, and orphaned processes by using dotnet run or dotnet build against a running 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 stop / aspire wait instead of dotnet run, curl polling, or manual process kills. - File-Lock Recovery: Provides a deterministic recovery sequence (aspire stop first) for MSB3491 and CS2012 build errors caused by Aspire holding output assemblies. - Project Detection: Fingerprints C# AppHosts (Aspire.AppHost.Sdk), file-based AppHosts (apphost.cs), and TypeScript AppHosts (apphost.ts) before acting. - Use Case: An agent hits "port already in use" after a code change; it runs aspire stop, then aspire start --isolated in the git worktree, and aspire wait myapi before continuing. ## Quick Start Ask the agent to start your Aspire app in the background and wait until the API resource is ready before running any further commands.

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`. In git worktrees add `--isolated` to avoid port conflicts, and add `--non-interactive` so commands never prompt for input.

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

These errors mean Aspire is running and holding locks on bin/ and obj/ outputs. Run `aspire stop` first, then rebuild or restart; never delete bin/obj, kill dotnet processes, or assume a permanent build failure.

Should I use aspire run or aspire start?▼

Use `aspire start` for agents because it runs detached in the background and returns control immediately. `aspire run` is foreground and interactive, intended for human developers at a terminal.

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's `displayName`, not its `name` field. Run `aspire ps --format Json` and pass the `displayName` value to `aspire wait`.

When should I restart the whole AppHost versus a single resource?▼

Restart the full AppHost only when AppHost code, integrations, or resource definitions changed. For a single resource change, prefer resource-scoped commands like `aspire resource <name> rebuild` or the framework's own watch and hot reload workflow.