/aspire:aspire-project-v2-migrationfrom aspire
Safely migrates eligible .NET Aspire 13.6+ AppHosts from legacy ProjectResource APIs to experimental DotnetProjectResource APIs with per-resource assessment and explicit approval before edits.
Ships in aspire. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Migrate supported legacy .NET project resources to the experimental
DotnetProjectResource model without silently changing application behavior.
This skill first applies to AppHosts targeting Aspire 13.6 or newer.
Approval boundary: A request such as "migrate to Project v2" authorizes an assessment, not unseen edits. Present the exact per-resource and per-file plan, then obtain approval before changing AppHost, package, project-reference, or application files. Apply only explicitly approved subsets.
TargetFramework, and do not upgrade Aspire implicitly.AddDotnetProject, publishing, EF, and Blazor capabilities used by the app.
Development packages are development-build evidence, not released-package evidence..aspire/modules/ files.aspire docs search and aspire docs api search ... --language csharp|typescript before relying on unfamiliar or preview API shapes.addDotnetProject(name, path, options?: DotnetProjectOptions) API with a flat DTO. Older handle-only target
builds are a capability stop, not a second supported migration path.
Legacy source ProjectResourceOptions values remain RPC handles.The publishing and TypeScript options changes are merged upstream, but a 13.6 version label alone does not prove that a consumer's packages contain them. See compatibility-and-validation.md for the merged API baseline and publishing boundaries.
If .agents/skills/aspire-project-v2-migration/SKILL.md exists, check aspire --version.
On Aspire 13.6 and earlier, warn the user and defer to that project-local skill while
retaining these safety gates. On Aspire 17.0 and later, treat the copy as stale unless the
user says they maintain it. Use this skill, tell the user the copy is stale, and suggest
aspire doctor, which lists each copy and explains how to remove it.
Keep the assessment read-only in the application workspace. Inspect source and already-resolved metadata; do not restore, build, run, or regenerate SDK files before approval, even for capability discovery. If preparation is necessary to verify eligibility or APIs, describe that prerequisite and request approval for it rather than silently modifying the workspace.
Inspect the selected AppHost and every legacy candidate:
AddProject<Projects.T>, path/directory AddProject, AddCSharpApp, and
polyglot equivalents.ProjectReference / file-based #:project edges and every consumer of
generated project metadata. Resolve Projects.* through real
IProjectMetadata, project-reference metadata, and
AspireProjectMetadataTypeName; never guess a path from a type name.ProjectResource, including casts, constraints,
GetProjectResources(), publishers, image managers, direct constructors, or
specialized subclasses.An already migrated app or an app with no matching resources is a no-op.
Present a table before editing:
| Resource | Current API and source | Proposed replacement | Behavior retained / intentional change | Package and reference edits | Classification |
|---|---|---|---|---|---|
api | AddProject<Projects.Api> → resolved path | AddDotnetProject("api", path) | args, profiles, endpoints, env, refs, waits, replicas, publishing | add Aspire.Hosting.Dotnet; remove only proven-exclusive edge | supported / decision / unsupported |
Explain:
ASPIREDOTNETPROJECT001 is an experimental API diagnostic.Ask for approval of that exact plan. Do not migrate a "safe-looking" subset until the subset and retained resources are explicitly approved.
For a Blazor gateway, approval of the API replacement or "Dockerfile to SDK"
switch alone is not approval of an implicit framework, base-image, or process-user
change. List the resolved deployment differences and obtain explicit approval
for them before editing. Briefly explain runtime/OS compatibility and non-root
file/volume-permission implications; a list of changed values alone is not informed
approval. If those values cannot be established read-only, classify
the gateway as decision-required and request approval for the preparation needed
to resolve them. Do not invent defaults or assume deployment equivalence.
Preserve exact prerelease identifiers from the resolved evidence when reporting
or requesting approval: for example, say .NET 11 RC1 and 11.0.0-rc.1, not
the less specific .NET 11 RC or 11.0 prerelease. Approval applies to the
specific resolved runtime and image, not merely its release channel.
End that assessment with the gateway decision: request approval for specific
bounded discovery, or ask whether to retain the gateway/review an owned publishing
policy. Asking only about API edits does not resolve the gateway approval boundary.
Before sending an assessment with an unresolved gateway, check the final question: it must explicitly ask the user to choose gateway bounded discovery or gateway retention plus owned publishing-policy review. Never end with only API-edit approval while the gateway is still decision-required.
End the assessment with an actual approval request, not just a description of what approval would mean. Use the host's user-question tool when available; otherwise ask explicitly whether the user approves the listed resource and file changes. Wait for the answer before editing. An unavailable user is not approval.
After approval, capture the legacy behavior in a disposable copy when validation is authorized and feasible. Use the same qualified toolchain before and after; report pre-existing failures rather than attributing them to the migration.
Load migration-patterns.md and follow its exact language-specific mappings.
Aspire.Hosting.Dotnet at a version compatible with the already-targeted
AppHost, preserving central package management and repository conventions.DotnetProjectOptions object. Preserve the
established values from legacy source; do not redesign addProject,
addCSharpApp, or the shared ProjectResourceOptions handle.IResourceBuilder<ProjectResource> annotations
tied to approved resources. Do not broadly rewrite public/custom contracts.ASPIREDOTNETPROJECT001 narrowly so the edited
AppHost compiles. Prefer paired #pragma warning disable ASPIREDOTNETPROJECT001 / #pragma warning restore ASPIREDOTNETPROJECT001 immediately around the approved Project v2 declarations.
Use a project-level NoWarn only when repository convention and the approved
migration scope make that equally narrow. Never suppress unrelated diagnostics
or leave an unbounded disable.
The AddEFMigrations overload selected for IDotnetProgramResource also requires
a paired ASPIREPROJECTS001 suppression around that EF declaration; the legacy
overload did not. Include this compilation-required edit in the approval scope.
Preserve existing ASPIREBLAZOR001 scopes where the client/gateway calls need them.Remove an AppHost ProjectReference or #:project only when it is proven to exist
exclusively for approved migrated resources and no generated metadata consumer
remains. Retain:
Projects.* consumers;ReferenceOutputAssembly="false" does not prevent an AppHost reference from
participating in the build and is not a substitute for safe cleanup.
Keep runtime WithEnvironment values at runtime. Add WithBuildEnvironment only
for an established, approved MSBuild input; never move environment configuration
wholesale or treat runtime working directory as build context.
Use WithContainerBuildOptions for supported image identity, destination, format,
and target-platform settings. Do not translate those settings into prohibited
build-environment properties.
After approved edits:
aspire start --non-interactive --isolated --apphost <path> when isolation is needed.aspire wait <resource> --apphost <path> --non-interactive and structured
Aspire inspection, not manual polling.aspire publish is not proof that an image was built. Run only the
authorized validation stages; never push images or deploy as an implicit check.
Do not claim unexecuted, skipped, or unavailable checks passed.
For approved gateway image changes, verify the exact accepted target contract
and unchanged behavior separately. Report the intentional differences, not
"image parity"; a smoke-test pass does not authorize new framework/user changes.Report migrated, intentionally retained, and blocked resources, plus actual validation and manual follow-up. Preserve the user's edits if validation fails.
Load compatibility-and-validation.md for the full decision matrix. Never automatically replace:
ProjectResource subtypes;new ProjectResource(...);GetProjectResources() consumers without a user decision;IDotnetProgramResource is an identity marker. It does not by itself configure
publishing; SupportsDotnetProgramPublishing() is a capability check, not a reason
to rewrite every ProjectResource constraint.
For every file-based .cs candidate, the assessment must explicitly state that
it requires .NET 10+, does not support WithBuildEnvironment or EF CLI
operations, keeps runtime WithEnvironment values unchanged, and preserves
Native AOT unless the user separately approves PublishAot=false or chooses a
target-OS publishing environment.
Do not disable file-app Native AOT, replace a custom publishing model, or promise unfinished watch/hot-reload/partial-run behavior without explicit evidence and approval.
| Request | Route |
|---|---|
| Migrate legacy project resources to Project v2 | This skill |
| Upgrade Aspire packages or CLI only | aspire-orchestration |
| Create or wire an AppHost | aspire-init / aspireify |
| Start, stop, wait, or rebuild only | aspire-orchestration |
| Deploy or publish after migration | aspire-deployment |
| Diagnose runtime behavior | aspire-monitoring |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
aspire-migration, dotnet-project-resource, apphost, project-v2
npx claudepluginhub microsoft/aspire-skills --plugin aspire8 skills in this plugin
/aspire**WORKFLOW SKILL** - Aspire router. Detects AppHosts, enforces guardrails, and selects the right sub-skill. USE FOR: Aspire AppHost, Aspire CLI, distributed app, cloud-native .NET, aspire start/stop/resource/deploy/destroy/publish/init/new/add/wait/describe/ps/logs/otel, aspire agent init, WithBrowserLogs, WithTerminal, TerminalService, terminal prompts, WithRepl, tapes, Interaction Service, apphost.mts, apphost.go, TS package managers, Yarn Classic, custom resource commands, .aspire/modules recovery, ProjectResource to DotnetProjectResource migration, or Playwright URL discovery. DO NOT USE FOR: non-Aspire projects or ordinary build/test tasks. INVOKES: aspire-init, aspireify, aspire-project-v2-migration, aspire-orchestration, aspire-deployment, aspire-monitoring, aspire-terminals. FOR SINGLE OPERATIONS: Route directly to the matching sub-skill./aspire-deployment**WORKFLOW SKILL** — Deploy Aspire apps from AppHost models to Docker Compose, Kubernetes, Azure, AWS, or preview Radius. WHEN: "deploy Aspire app", "publish Aspire artifacts", "deploy to Azure Container Apps", "generate Kubernetes artifacts", "deploy to Radius", "tear down Aspire deployment". INVOKES: aspire CLI, Aspire docs, target cloud/container CLIs. FOR SINGLE OPERATIONS: use generic Azure, Kubernetes, Docker, AWS, or Radius tools only when no Aspire AppHost exists./aspireify**WORKFLOW SKILL** - Wire Aspire AppHosts or repair TypeScript AppHost toolchains. Scans the repo, proposes a resource graph, edits C#, file-based C#, TypeScript, or Go AppHosts, wires ServiceDefaults + OTel, validates with `aspire start`, then stops. USE FOR: wire/scaffold AppHost, add Postgres/Redis/Rabbit/Mongo, connect frontend to API, after `aspire init`, AddNextJsApp, AddViteApp, WithBrowserLogs, Interaction Service, command arguments, apphost.cs, apphost.mts, apphost.go, unified withEnvironment, .aspire/modules refusal, config/secrets, TS dependency restore, pnpm/yarn/bun, or Yarn Classic. DO NOT USE FOR: skeleton drop (aspire-init), lifecycle-only start/stop/wait/restart or `aspire update --migrate` (aspire-orchestration), publish/deploy/destroy (aspire-deployment), logs/traces (aspire-monitoring), terminal authoring or automation (aspire-terminals). INVOKES: aspire CLI, AppHost source edits, ServiceDefaults wiring. FOR SINGLE OPERATIONS: Run `aspire add PACKAGE` directly for a one-off integration./aspire-init**WORKFLOW SKILL** - First-run flow for adding Aspire to a repo. Picks `aspire new` (greenfield) or `aspire init` (existing repo), drops the AppHost skeleton, then hands off to `aspireify` for resource wiring. USE FOR: aspire init, aspire new, aspire-starter, aspire-ts-starter, aspire-py-starter, aspire-go-starter, add Aspire to existing repo, scaffold Aspire app, bootstrap Aspire, no AppHost detected, install aspireify, apphost.mts, apphost.go, Go AppHost, generated .aspire/modules. DO NOT USE FOR: AppHost wiring on an existing AppHost (use aspireify), start/stop/wait (use aspire-orchestration), deploy/publish (use aspire-deployment), logs/traces (use aspire-monitoring), repo that already has an AppHost. INVOKES: aspire CLI (init, new, doctor), aspireify (handoff after skeleton drop). FOR SINGLE OPERATIONS: Run `aspire init` or `aspire new TEMPLATE` directly./aspire-monitoring**ANALYSIS SKILL** - Observe Aspire apps: logs, traces, metrics, resource state, telemetry export, browser telemetry, and the standalone dashboard. Routes between local Aspire CLI, AKS workload diagnostics, and deployed Azure resource health. USE FOR: aspire logs, aspire otel logs, aspire otel traces, aspire otel spans, aspire describe, aspire ps, aspire export, aspire dashboard run, describe --include-hidden, browser logs in dashboard, DevTunnel URLs, WithBrowserLogs, App Insights query, AKS pod logs, container app logs. DO NOT USE FOR: start/stop/wait (use aspire-orchestration), deploy/publish/destroy (use aspire-deployment), AppHost code edits like WithBrowserLogs() (use aspireify), Azure provisioning (use azure-prepare), terminal authoring/input/tapes (use aspire-terminals). INVOKES: aspire CLI, azure-diagnostics (deployed Azure), kubectl + Container Insights. FOR SINGLE OPERATIONS: Run the aspire CLI command directly for quick log or describe lookups./aspire-orchestration**WORKFLOW SKILL** — Manage Aspire lifecycle in VS Code or the CLI. WHEN: "start or stop my Aspire app", "aspire_apphost_start", "aspire_apphost_stop", "notEditorOwned", "ambiguousSession", "aspire start", "aspire stop", "aspire wait", resource restart, file-lock errors (MSB3491 or CS2012), port conflicts, git worktrees, "--isolated", "aspire update --self", "aspire update --migrate", "aspire describe --include-hidden", "aspire stop --force", "aspire stop --force --volumes", integration discovery, default watch, or hot reload. INVOKES: VS Code lifecycle tools first when exposed; Aspire CLI for readiness, inspection, resource operations, isolated worktree starts, and allowed fallbacks. DO NOT USE FOR: deploy/publish/destroy (aspire-deployment), logs/traces/metrics (aspire-monitoring), terminal authoring/attach/tapes (aspire-terminals), or AppHost code and resource wiring (aspireify). FOR SINGLE OPERATIONS: Load the matching editor tool first; follow exact-target, worktree-isolation, and stop-result rules.Other plugins' skills for the same job