Repository navigation
Update all samples to Aspire 17.0 - #2173
Draft
David Pine (IEvangelist) wants to merge 6 commits into
Draft
David Pine (IEvangelist) wants to merge 6 commits into
David Pine (IEvangelist) wants to merge 6 commits into
Conversation
Stage SDK, package, CLI, and dashboard pins for the upcoming release. Keep Java on a temporary 17.0 preview pin until its exact release version is published. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
David Pine (IEvangelist)
marked this pull request as ready for review
November 14, 2026 05:34
David Pine (IEvangelist)
marked this pull request as draft
November 14, 2026 05:34
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Multiple samples still use obsolete AddProject or AddCSharpApp APIs under Aspire 17, causing build failures because inherited settings treat warnings as errors.
13 open issues
Migrate Grafana project to AddDotnetProject · New Migrate all four resources to AddDotnetProject · New Migrate frontend to AddDotnetProject · New Migrate weather API to AddDotnetProject · New Migrate all guarded projects to AddDotnetProject · New Migrate database resources to AddDotnetProject · New Migrate both resources to AddDotnetProject · New Migrate both C# apps to AddDotnetProject · New Migrate newsletter resource to AddDotnetProject · New Migrate Orleans project to AddDotnetProject · New Migrate reused notes API to AddDotnetProject · New Migrate notes API to AddDotnetProject · New Migrate obsolete AddProject calls to AddDotnetProject · New
What changed in this PR
Stages the repository-wide Aspire 17.0 upgrade across C# and TypeScript samples, integration tests, development environments, and CI. Release publication and full compatibility validation remain pending.
Changes:
- Updates Aspire SDKs and integrations to 17.0, with temporary preview versions for Java and PostgreSQL Entity Framework Core integrations.
- Aligns CLI installation, dashboard documentation, and conflicting Hosting, Entity Framework Core, and OpenTelemetry dependencies.
- Migrates database-containers’
apiserviceto Project v2 while retaining its references and health checks.
| File | Description |
|---|---|
| tests/SamplesIntegrationTests/SamplesIntegrationTests.csproj | Updates test hosting packages. |
| samples/volume-mount/VolumeMount.MigrationService/VolumeMount.MigrationService.csproj | Updates SQL Server integration. |
| samples/volume-mount/VolumeMount.BlazorWeb/VolumeMount.BlazorWeb.csproj | Updates storage and database integrations. |
| samples/volume-mount/VolumeMount.AppHost/VolumeMount.AppHost.csproj | Updates AppHost SDK and dependencies. |
| samples/vite-yarp-static/aspire.config.json | Updates TypeScript SDK and integrations. |
| samples/vite-react-fastapi/aspire.config.json | Updates TypeScript SDK and integrations. |
| samples/vite-csharp-postgres/aspire.config.json | Updates TypeScript SDK and integrations. |
| samples/vite-csharp-postgres/api/Api.csproj | Aligns PostgreSQL, EF Core, and telemetry dependencies. |
| samples/terminals/README.md | Documents the targeted Aspire version. |
| samples/terminals/docked-repl-csharp/README.md | Updates CLI prerequisite. |
| samples/terminals/docked-repl-csharp/aspire.config.json | Updates SDK version. |
| samples/terminals/docked-repl-csharp/apphost.cs | Updates file-based SDK directive. |
| samples/terminals/basics-typescript/README.md | Updates CLI prerequisite. |
| samples/terminals/basics-typescript/aspire.config.json | Updates SDK and hosting integrations. |
| samples/terminals/basics-csharp/README.md | Updates CLI prerequisite. |
| samples/terminals/basics-csharp/aspire.config.json | Updates SDK version. |
| samples/terminals/basics-csharp/apphost.cs | Updates SDK and Redis directives. |
| samples/terminals/basics-csharp/api/Notes.Api.csproj | Updates Redis client integration. |
| samples/terminals/automation-csharp/README.md | Updates CLI prerequisite. |
| samples/terminals/automation-csharp/aspire.config.json | Updates SDK version. |
| samples/terminals/automation-csharp/apphost.cs | Updates SDK and Redis directives. |
| samples/standalone-dashboard/README.md | Targets the 17.0 release dashboard image. |
| samples/spring-petclinic/README.md | Documents CLI and temporary Java preview version. |
| samples/spring-petclinic/aspire.config.json | Updates SDK and integrations, including Java preview. |
| samples/rag-document-qa-svelte/aspire.config.json | Updates SDK and AI-related integrations. |
| samples/python-script/aspire.config.json | Updates SDK and Python integration. |
| samples/python-openai-agent/aspire.config.json | Updates SDK and agent hosting integrations. |
| samples/python-fastapi-postgres/aspire.config.json | Updates SDK and hosting integrations. |
| samples/polyglot-task-queue/worker-csharp/worker-csharp.csproj | Updates RabbitMQ integration and telemetry dependency. |
| samples/polyglot-task-queue/aspire.config.json | Updates SDK and queue hosting integrations. |
| samples/orleans-voting/OrleansVoting.Service/OrleansVoting.Service.csproj | Updates Redis client integration. |
| samples/orleans-voting/OrleansVoting.AppHost/OrleansVoting.AppHost.csproj | Updates AppHost SDK and dependencies. |
| samples/node-express-redis/aspire.config.json | Updates SDK and hosting integrations. |
| samples/Metrics/MetricsApp.AppHost/MetricsApp.AppHost.csproj | Updates AppHost SDK and Hosting dependency. |
| samples/maildev-mailkit/README.md | Updates Aspire version documentation. |
| samples/maildev-mailkit/MailDev.Hosting/MailDev.Hosting.csproj | Updates custom integration’s hosting dependency. |
| samples/maildev-mailkit/CSharpAppHost/CSharpAppHost.csproj | Updates comparison AppHost’s hosting dependency. |
| samples/maildev-mailkit/aspire.config.json | Updates TypeScript SDK version. |
| samples/image-gallery/worker/worker.csproj | Aligns Aspire, SQL Server, and telemetry dependencies. |
| samples/image-gallery/apphost.cs | Updates SDK and Azure hosting directives. |
| samples/image-gallery/api/api.csproj | Aligns Aspire, EF Core, and telemetry dependencies. |
| samples/health-checks-ui/HealthChecksUI.Web/HealthChecksUI.Web.csproj | Updates Redis output-caching integration. |
| samples/health-checks-ui/HealthChecksUI.AppHost/HealthChecksUI.AppHost.csproj | Updates AppHost SDK and dependencies. |
| samples/golang-api/aspire.config.json | Updates SDK and Docker integration. |
| samples/database-migrations/DatabaseMigrations.MigrationService/DatabaseMigrations.MigrationService.csproj | Updates SQL Server integration. |
| samples/database-migrations/DatabaseMigrations.AppHost/DatabaseMigrations.AppHost.csproj | Updates AppHost SDK and dependencies. |
| samples/database-migrations/DatabaseMigrations.ApiService/DatabaseMigrations.ApiService.csproj | Updates SQL Server integration. |
| samples/database-containers/DatabaseContainers.AppHost/DatabaseContainers.AppHost.csproj | Updates dependencies and adds Project v2 hosting package. |
| samples/database-containers/DatabaseContainers.AppHost/AppHost.cs | Migrates apiservice to AddDotnetProject. |
| samples/database-containers/DatabaseContainers.ApiService/DatabaseContainers.ApiService.csproj | Updates database client integrations. |
| samples/custom-resources/CustomResources.AppHost/CustomResources.AppHost.csproj | Updates AppHost SDK and Hosting dependency. |
| samples/container-build/apphost.cs | Updates file-based SDK directive. |
| samples/client-apps-integration/ClientAppsIntegration.AppHost/ClientAppsIntegration.AppHost.csproj | Updates AppHost SDK and Hosting dependency. |
| samples/aspire-with-python/apphost.cs | Updates SDK and hosting package directives. |
| samples/aspire-with-node/aspire.config.json | Updates SDK and JavaScript integration. |
| samples/aspire-with-javascript/AspireJavaScript.AppHost/AspireJavaScript.AppHost.csproj | Updates AppHost SDK and dependencies. |
| samples/aspire-with-azure-functions/ImageGallery.AppHost/ImageGallery.AppHost.csproj | Updates AppHost SDK. |
| samples/aspire-with-azure-functions/Directory.Packages.props | Updates centrally managed Aspire and Hosting versions. |
| samples/aspire-shop/AspireShop.CatalogDbManager/AspireShop.CatalogDbManager.csproj | Updates PostgreSQL preview integration and EF tooling. |
| samples/aspire-shop/AspireShop.CatalogDb/AspireShop.CatalogDb.csproj | Targets PostgreSQL EF integration preview. |
| samples/aspire-shop/AspireShop.BasketService/AspireShop.BasketService.csproj | Updates Redis client integration. |
| samples/aspire-shop/AspireShop.AppHost/AspireShop.AppHost.csproj | Updates AppHost SDK and dependencies. |
| README.md | Updates installation instructions and staging caveats. |
| build/azure-pipelines.yml | Targets CLI 17.0 in Azure Pipelines. |
| .github/workflows/ci.yml | Targets CLI 17.0 in GitHub Actions. |
| .devcontainer/devcontainer.json | Installs CLI 17.0 at container startup. |
Review effort: Balanced
| <ItemGroup> | ||
| <PackageReference Include="Aspire.Hosting.AppHost" Version="13.6.0" /> | ||
| <PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.14" /> | ||
| <PackageReference Include="Aspire.Hosting.AppHost" Version="17.0.0" /> |
| <PackageReference Include="Aspire.Hosting.PostgreSQL" Version="13.6.0" /> | ||
| <PackageReference Include="Aspire.Hosting.Redis" Version="13.6.0" /> | ||
| <PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.14" /> | ||
| <PackageReference Include="Aspire.Hosting.AppHost" Version="17.0.0" /> |
| <ItemGroup> | ||
| <PackageVersion Include="Aspire.Hosting.AppHost" Version="13.6.0" /> | ||
| <PackageVersion Include="Aspire.Hosting.Azure" Version="13.6.0" /> | ||
| <PackageVersion Include="Aspire.Hosting.AppHost" Version="17.0.0" /> |
| <ItemGroup> | ||
| <PackageReference Include="Aspire.Hosting.AppHost" Version="13.6.0" /> | ||
| <PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.14" /> | ||
| <PackageReference Include="Aspire.Hosting.AppHost" Version="17.0.0" /> |
| <ItemGroup> | ||
| <PackageReference Include="Aspire.Hosting.AppHost" Version="13.6.0" /> | ||
| <PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.14" /> | ||
| <PackageReference Include="Aspire.Hosting.AppHost" Version="17.0.0" /> |
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Aspire.Hosting" Version="13.6.0" /> | ||
| <PackageReference Include="Aspire.Hosting" Version="17.0.0" /> |
| <ItemGroup> | ||
| <PackageReference Include="Aspire.Hosting.AppHost" Version="13.6.0" /> | ||
| <PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.14" /> | ||
| <PackageReference Include="Aspire.Hosting.AppHost" Version="17.0.0" /> |
| #:package Aspire.Hosting.Redis@13.6.0 | ||
| #:sdk Aspire.AppHost.Sdk@13.6.0 | ||
| #:package Aspire.Hosting.Redis@17.0.0 | ||
| #:sdk Aspire.AppHost.Sdk@17.0.0 |
| #:package Aspire.Hosting.Redis@13.6.0 | ||
| #:sdk Aspire.AppHost.Sdk@13.6.0 | ||
| #:package Aspire.Hosting.Redis@17.0.0 | ||
| #:sdk Aspire.AppHost.Sdk@17.0.0 |
| <ItemGroup> | ||
| <PackageReference Include="Aspire.Hosting.AppHost" Version="13.6.0" /> | ||
| <PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.14" /> | ||
| <PackageReference Include="Aspire.Hosting.AppHost" Version="17.0.0" /> |
Replace the TypeScript AppHost with a Go AppHost that uses AddGoApp and AddDockerComposeEnvironment. AddGoApp runs `go run .` during `aspire run` and builds the image from the Dockerfile that is checked in next to the API when publishing, so the API source is unchanged. Pin the Aspire 17.0.0 SDK and packages, document the 17.0 CLI and Go 1.26 prerequisites, and correct the teardown step name to docker-compose-down-env. Add `*.go text eol=lf` so gofmt accepts Go files on every platform, and mark the sample as a Go AppHost in the root README. Closes #2110 Part of microsoft/aspire#21115 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c8717a87-0ee5-4296-a6fd-ea6e2d91a57e Copilot-Session: 312a6350-61af-44ac-aa2f-ca505eee1891
Build.proj only enumerates C# and TypeScript AppHosts, so Go AppHosts are not covered by the build job. Add a Linux job that installs the Aspire CLI at ASPIRE_CLI_VERSION, sets up Go with a SHA-pinned actions/setup-go, and runs build/validate-go.sh. The script restores each samples/**/apphost.go and runs go build and go vet on it, and fails when no Go AppHost is found. Add the job to ci-gate. Part of microsoft/aspire#21115 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c8717a87-0ee5-4296-a6fd-ea6e2d91a57e Copilot-Session: 312a6350-61af-44ac-aa2f-ca505eee1891
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Stage the repository-wide Aspire 17.0 upgrade ahead of the planned Tuesday release, and convert the
golang-apisample to a Go AppHost.17.0.0.17.0.0-preview.1.*forAspire.Hosting.JavaandAspire.Npgsql.EntityFrameworkCore.PostgreSQL, which remain preview integrations. Replace these with exact published versions before merging.apiserviceresource to Project v2, retaining its existing project reference and resource configuration.samples/golang-apito a Go AppHost.apphost.goandgo.modreplace the TypeScript AppHost, andaspire.config.jsonpins the SDK,Aspire.Hosting.Docker, andAspire.Hosting.Goto17.0.0. The AppHost runs the API withAddGoAppandWithModTidy, publishes it to a Docker Compose environment from the Dockerfile that is already checked in next to the API, and sets no experimental feature flag (microsoft/aspire#21183 removed it and is inrelease/17.0). The API inapi/is unchanged.Validate Go AppHostsCI job.build/validate-go.shrunsaspire restore,go build, andgo vetfor every trackedsamples/**/apphost.go, using Go 1.26 and the sharedASPIRE_CLI_VERSIONpin, andCI Gatenow requires the job..gitattributeskeeps*.gofiles on LF endings.Closes #2110. Part of microsoft/aspire#21115. Supersedes #2111, which is folded into this PR to reduce review work.
Release reference
Compatibility reference: microsoft/aspire release/17.0, at commit
ade85493595286bb853ef410a395b93100cb2474on November 13. The locally installed 17.0 CLI reports the same commit. Earlier broad staged checks used commit4084327635a16237ab8d0babc07701493525f12b.This PR targets aspire-samples/main. The Aspire source branch is a compatibility reference, not a package source. NuGet.org feeds and the required check names remain unchanged;
CI Gatenow also depends on the newValidate Go AppHostsjob. No checks are disabled or bypassed.Validation and known blockers
vite-csharp-postgres/api, andimage-gallery/api. CatalogDbManager emitted warnings that its MSBuild 18.11 dependencies are untested on .NET 10..csprojfiles against the current staged package snapshot. It caught and fixed two moreNU1605downgrades:image-gallery/workernow aligns EF Core SQL Server to 10.0.15 and OpenTelemetry Hosting to 1.18.0;polyglot-task-queue/worker-csharpaligns OpenTelemetry Hosting to 1.18.0. Both worker builds pass with no warnings.CS0618at legacyAddProjectcalls. The Azure Functions failure remains unresolved.ASPIREDOTNETPROJECT001is suppressed only around the migrated declaration;ASPIRE012remains because the AppHost SDK is retained.CS0618to a warning only for comparison. Persistent-container and publishing parity remain unverified.Go AppHost (folded in from #2111)
17.0.0-devpins, a locally built dev CLI, Go 1.27.0, and Docker 29.9.1, as reported in Convert golang-api to a Go AppHost #2111:aspire restore,go build,go vet, andgofmtpassed;aspire runreached healthy in 9.0s and/healthreturned 200;aspire stoppassed;aspire publishwrotedocker-compose.yamland.env;aspire do --list-stepslisted 26 steps includingdocker-compose-down-env;aspire do build-apibuilt an image whose/healthreturned 200.build/validate-go.shpassedbash -nand a stub-based test.a3b91c4,Validate Go AppHostspasses checkout andactions/setup-go, then fails at "Install Aspire CLI" with the same HTTP 404 forv17.0.0as the other jobs, so it never reaches validation.CI Gatestays red until 17.0.0 is published.aspire deployanddocker compose up/downend to end (the published compose file reads the image fromAPI_IMAGE, which the deploy flow is expected to supply); the dashboard UI; and thego-apphostsjob past the CLI install (it installs no .NET SDK and relies on the SDK on theubuntu-24.04image).9003, and the Go AppHost does not. Go callbacks that take a resource builder received nil (microsoft/aspire#21255). microsoft/aspire#21261 fixed that and is inrelease/17.0, so the pin can be restored once a CLI that includes the fix is available to verify it.WithModTidy()runsgo mod tidy -e, which can hide module download failures.Before marking ready
release/17.0still lacks the 13.6.5 dashboard tunnel restriction; microsoft/aspire#22170 describes the 17.0 backport as separate follow-up work.AddProjectbuild errors and review the AppHost SDK deprecation and the .NET 10/MSBuild warnings without silently changing sample behavior.Aspire.Hosting.GoandAspire.Hosting.Docker17.0.0 are published, validate the Go AppHost with the released CLI (aspire restore,aspire run,aspire publish), and confirmValidate Go AppHostspasses on a real runner.9003) in the Go AppHost withConfigureDashboard, and verify it with a CLI that includes the Go AppHost: callbacks that take a resource builder receive nil and panic aspire#21255 fix.