aspire-orchestration

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

2|Updated Jul 24, 2026
One-click install
npx skills add https://github.com/elbruno/ElBruno.MagenticUI --skill aspire-orchestration-elbruno
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: aspire-orchestration
Source: https://github.com/elbruno/ElBruno.MagenticUI/tree/main/.agents/skills/aspire-orchestration
Command: npx skills add https://github.com/elbruno/ElBruno.MagenticUI --skill aspire-orchestration-elbruno

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? AI agents working in Aspire projects frequently 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 distributed applications without corrupting the development environment. ## Core Features & Use Cases - Safe Lifecycle Management: Enforces aspire start, aspire wait, aspire stop, and resource-scoped commands instead of dangerous dotnet run or manual process kills. - File-Lock Recovery: Provides a deterministic recovery sequence for MSB3491 and CS2012 build errors caused by Aspire holding locks on bin/ and obj/ outputs. - Project Detection: Fingerprints C#, file-based C#, and TypeScript AppHosts via SDK references, apphost files, and aspire.config.json. - Use Case: An agent hits "error MSB3491: Could not write to output file" 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 any requests against it.

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 launch the AppHost in the background, never `dotnet run`. Add `--isolated` in git worktrees and `--non-interactive` for agent terminals, then use `aspire wait <resource>` before interacting with any service.

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

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

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, an apphost.ts file, or an aspire.config.json at the repo root. References to Aspire.ServiceDefaults indicate a service project within an Aspire solution.

Should I use aspire run or aspire start for automation?▼

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

Why does aspire ps not show my proxy or migration containers?▼

Aspire hides resources marked as hidden by default, including proxies, helper containers, and migration jobs. Run `aspire ps --include-hidden --format Json` to see the full resource graph before assuming the AppHost is misconfigured.

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

Restart the whole AppHost with `aspire stop` then `aspire start` only when AppHost code, integrations, or resource definitions changed. For a single resource change, use `aspire resource <name> rebuild` or the framework's watch and hot reload workflow.