Add consolidated Aspire 13.x migration guide for 9.x upgrades#432
Add consolidated Aspire 13.x migration guide for 9.x upgrades#432
Conversation
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
| aspire add javascript | |
| aspire add javaScript |
| - **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 |
There was a problem hiding this comment.
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.
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-guidecovering:Aspire.Hosting.NodeJs→Aspire.Hosting.JavaScriptAddNpmApp()removed →AddJavaScriptApp().WithRunScript()AddNodeApp()refactored: absolute paths → appDirectory + relative scriptPathIDistributedApplicationLifecycleHook→IDistributedApplicationEventingSubscriberWithPublishingCallback()→WithPipelineStepFactory()Model→ModelName,Database→DatabaseNameacross GitHub Models, OpenAI, Milvus, MongoDB, MySQL, OracleAddAzureRedisEnterprise()→AddAzureManagedRedis()EndpointReference.GetValueAsync()now waits for allocation instead of throwing immediatelyKey migration examples
JavaScript apps:
Lifecycle hooks:
Screenshots
Quick migration checklist:

JavaScript API migrations:

Connection property renames (13.1):

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/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/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)/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/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/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/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)/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/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)/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/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/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)/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/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/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)/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/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)/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/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)/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)/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/"pagefind" --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
💡 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.