Skip to content

Add consolidated Aspire 13.x migration guide for 9.x upgrades#432

Open
Copilot wants to merge 2 commits intomainfrom
copilot/create-migration-guide-aspire-13
Open

Add consolidated Aspire 13.x migration guide for 9.x upgrades#432
Copilot wants to merge 2 commits intomainfrom
copilot/create-migration-guide-aspire-13

Conversation

Copy link
Contributor

Copilot AI commented Feb 18, 2026

Aspire 13.0/13.1 introduced breaking changes across packages, APIs, and behaviors. Existing what's-new documentation was comprehensive but not organized as an actionable upgrade path, causing compilation errors for users migrating from 9.x.

Changes

Consolidated migration guide at whats-new/aspire-13/#migration-guide covering:

  • Quick checklist: 10-step upgrade path from CLI update through testing
  • Package renames: Aspire.Hosting.NodeJsAspire.Hosting.JavaScript
  • JavaScript API migrations:
    • AddNpmApp() removed → AddJavaScriptApp().WithRunScript()
    • AddNodeApp() refactored: absolute paths → appDirectory + relative scriptPath
  • Lifecycle hooks → Events: IDistributedApplicationLifecycleHookIDistributedApplicationEventingSubscriber
  • Publishing callbacks → Pipeline steps: WithPublishingCallback()WithPipelineStepFactory()
  • Connection property renames (13.1): ModelModelName, DatabaseDatabaseName across GitHub Models, OpenAI, Milvus, MongoDB, MySQL, Oracle
  • Azure Redis rename (13.1): AddAzureRedisEnterprise()AddAzureManagedRedis()
  • Behavioral changes: EndpointReference.GetValueAsync() now waits for allocation instead of throwing immediately

Key migration examples

JavaScript apps:

// Before (9.x)
builder.AddNpmApp("frontend", "../frontend", scriptName: "dev");
builder.AddNodeApp("api", "/absolute/path/to/app.js", workingDirectory: "/absolute/path/to");

// After (13.0)
builder.AddJavaScriptApp("frontend", "../frontend").WithRunScript("dev");
builder.AddNodeApp("api", "../api", "app.js");

Lifecycle hooks:

// Before (9.x)
public class MyHook : IDistributedApplicationLifecycleHook { ... }
builder.Services.TryAddLifecycleHook<MyHook>();

// After (13.0)
public class MySubscriber : IDistributedApplicationEventingSubscriber { ... }
builder.Services.TryAddEventingSubscriber<MySubscriber>();

Screenshots

Quick migration checklist:
Migration checklist

JavaScript API migrations:
JavaScript APIs

Connection property renames (13.1):
Connection properties

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/CommunityToolkit/Aspire
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./scripts/update-github-stats.js (http block)
  • https://api.github.com/repos/CommunityToolkit/Aspire/contributors
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (http block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build git log �� %aE ���� --follow s/.bin/git udes/config-settgit --follow it git log �� %aE ���� --follow escript@5.9.3_/node_modules/@astrojs/starlight/node_modules/.bin/../../../../../../pagefind@1.4 udes/option-versgit --follow 0/x64/lib/node_m--pretty=format:������������ %H �� %aI �� %s �� %D �� %b �� %aN �� %aE ���� git (http block)
  • https://api.github.com/repos/dotnet/aspire
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./scripts/update-github-stats.js (http block)
  • https://api.github.com/repos/dotnet/aspire-samples
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./scripts/update-github-stats.js (http block)
  • https://api.github.com/repos/dotnet/aspire-samples/contributors
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (http block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build git log �� %aE ���� --follow s/.bin/git udes/config-settgit --follow it git log �� %aE ���� --follow escript@5.9.3_/node_modules/@astrojs/starlight/node_modules/.bin/../../../../../../pagefind@1.4 udes/option-versgit --follow 0/x64/lib/node_m--pretty=format:������������ %H �� %aI �� %s �� %D �� %b �� %aN �� %aE ���� git (http block)
  • https://api.github.com/repos/dotnet/aspire/contributors
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (http block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build git log �� %aE ���� --follow s/.bin/git udes/config-settgit --follow it git log �� %aE ���� --follow escript@5.9.3_/node_modules/@astrojs/starlight/node_modules/.bin/../../../../../../pagefind@1.4 udes/option-versgit --follow 0/x64/lib/node_m--pretty=format:������������ %H �� %aI �� %s �� %D �� %b �� %aN �� %aE ���� git (http block)
  • https://api.github.com/repos/microsoft/aspire.dev
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./scripts/update-github-stats.js (http block)
  • https://api.github.com/repos/microsoft/aspire.dev/contributors
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (http block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build git log �� %aE ���� --follow s/.bin/git udes/config-settgit --follow it git log �� %aE ���� --follow escript@5.9.3_/node_modules/@astrojs/starlight/node_modules/.bin/../../../../../../pagefind@1.4 udes/option-versgit --follow 0/x64/lib/node_m--pretty=format:������������ %H �� %aI �� %s �� %D �� %b �� %aN �� %aE ���� git (http block)
  • https://api.github.com/repos/microsoft/dcp
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./scripts/update-github-stats.js (http block)
  • https://api.github.com/repos/microsoft/dcp/contributors
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (http block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build git log �� %aE ���� --follow s/.bin/git udes/config-settgit --follow it git log �� %aE ���� --follow escript@5.9.3_/node_modules/@astrojs/starlight/node_modules/.bin/../../../../../../pagefind@1.4 udes/option-versgit --follow 0/x64/lib/node_m--pretty=format:������������ %H �� %aI �� %s �� %D �� %b �� %aN �� %aE ���� git (http block)
  • learn.microsoft.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build git log �� %aE ���� --follow s/.bin/git udes/config-settgit --follow it git log �� %aE ���� --follow escript@5.9.3_/node_modules/@astrojs/starlight/node_modules/.bin/../../../../../../pagefind@1.4 udes/option-versgit --follow 0/x64/lib/node_m--pretty=format:������������ %H �� %aI �� %s �� %D �� %b �� %aN �� %aE ���� git (dns block)
  • telemetry.astro.build
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js build git log �� %aE ���� --follow s/.bin/git udes/config-settgit --follow it git log �� %aE ���� --follow escript@5.9.3_/node_modules/@astrojs/starlight/node_modules/.bin/../../../../../../pagefind@1.4 udes/option-versgit --follow 0/x64/lib/node_m--pretty=format:������������ %H �� %aI �� %s �� %D �� %b �� %aN �� %aE ���� git (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/astro.js preview git log %D �� %b �� %aN src/frontend/src/content/docs/whats-new/upgrade-aspire.mdx --follow it udes/option-waitsh --follow modules/@npmcli/&#34;pagefind&#34; --site ../../../../../../dist git log %D �� %b �� %aN �� %aE ���� --follow /node-gyp-bin/node ference/cli/commsh --follow k/aspire.dev/nodpnpm --dir ./src/frontend run preview git (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[What's New Analysis] Create Aspire 13.x migration guide</issue_title>
<issue_description>## Summary

Aspire 13.0 and 13.1 have significant breaking changes that are only documented in what's-new. Need a dedicated migration guide.

Breaking Changes to Document

Package Renames

<!-- Before (9.x) -->
<PackageReference Include="Aspire.Hosting.NodeJs" Version="9.x.x" />

<!-- After (13.0) -->
<PackageReference Include="Aspire.Hosting.JavaScript" Version="13.0.0" />

API Signature Changes

AddNodeApp refactored:

// Before (9.x) - absolute scriptPath with optional workingDirectory
builder.AddNodeApp("frontend", "/absolute/path/to/app.js", 
    workingDirectory: "/absolute/path/to");

// After (13.0) - appDirectory with relative scriptPath
builder.AddNodeApp("frontend", "../frontend", "app.js");

AddNpmApp removed:

// Before (9.x)
builder.AddNpmApp("frontend", "../frontend", scriptName: "dev");

// After (13.0)
builder.AddJavaScriptApp("frontend", "../frontend")
    .WithRunScript("dev");

Lifecycle Hooks → Events

// Before (9.x)
public class MyHook : IDistributedApplicationLifecycleHook { ... }
builder.Services.TryAddLifecycleHook<MyHook>();

// After (13.0)
public class MySubscriber : IDistributedApplicationEventingSubscriber { ... }
builder.Services.TryAddEventingSubscriber<MySubscriber>();

Publishing Callbacks → Pipeline Steps

// Before (9.x)
.WithPublishingCallback(async (context, ct) => { ... });

// After (13.0)
.WithPipelineStepFactory(context => new PipelineStep() { ... });

Connection Property Renames (13.1)

Resource Old New
GitHub Models Model ModelName
OpenAI model Model ModelName
Milvus database Database DatabaseName
MongoDB database Database DatabaseName
MySQL database Database DatabaseName

Azure Redis Rename (13.1)

// Before
builder.AddAzureRedisEnterprise("cache");

// After
builder.AddAzureManagedRedis("cache");

Suggested Content

  1. Quick migration checklist - package updates, API changes
  2. Package rename mapping - old → new
  3. API signature changes - with before/after examples
  4. Lifecycle hooks migration - step-by-step
  5. Publishing callbacks migration - step-by-step
  6. Breaking behavior changes - EndpointReference.GetValueAsync now waits

Why It Matters

Users upgrading from 9.x hit compilation errors with no clear guidance. What's-new is comprehensive but not organized as a migration checklist.</issue_description>

<agent_instructions>Please update this https://aspire.dev/whats-new/aspire-13/#migration-guide</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Copilot AI changed the title [WIP] Create migration guide for Aspire 13.x breaking changes Add consolidated Aspire 13.x migration guide for 9.x upgrades Feb 18, 2026
Copilot AI requested a review from IEvangelist February 18, 2026 04:26
@IEvangelist IEvangelist marked this pull request as ready for review February 18, 2026 13:15
Copilot AI review requested due to automatic review settings February 18, 2026 13:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a consolidated “Migration guide” section to the Aspire 13 “What’s new” page to provide an actionable upgrade path from Aspire 9.x to 13.x, consolidating breaking changes from 13.0 and 13.1 into a checklist + focused migration subsections.

Changes:

  • Introduces a 10-step quick migration checklist for upgrading CLI, packages, and key breaking changes.
  • Adds structured migration subsections for package renames, JavaScript hosting API changes, lifecycle hooks → eventing, publishing callbacks → pipeline steps, connection property renames, Azure Redis rename, and EndpointReference.GetValueAsync() behavior.
  • Provides before/after code examples and a connection property/environment variable rename table.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

aspire add nodejs

# After (13.0)
aspire add javascript
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CLI command is shown here as aspire add javascript, but the same document’s earlier “Package renames” section shows aspire add javaScript (different casing). Please normalize the command casing throughout this page to avoid confusing readers and to match the actual CLI verb.

Suggested change
aspire add javascript
aspire add javaScript

Copilot uses AI. Check for mistakes.
Comment on lines +1767 to +1769
- **First parameter changed**: `scriptPath` (absolute) → `appDirectory` (relative to AppHost)
- **Second parameter changed**: `workingDirectory` (optional) → `scriptPath` (relative to appDirectory)
- **Automatic npm integration**: If `package.json` exists in `appDirectory`, npm is automatically configured
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section describes the 9.x scriptPath as “absolute”, but the migration example just below uses a relative path (../frontend/server.js). Consider rewording to avoid claiming absolute paths were required (or adjust the example) so the guidance is internally consistent.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[What's New Analysis] Create Aspire 13.x migration guide

2 participants

Comments