Skip to content

Update all samples to Aspire 17.0 - #2173

Draft
David Pine (IEvangelist) wants to merge 6 commits into
mainfrom
ievangelist-aspire-17-upgrade
Draft

David Pine (IEvangelist) wants to merge 6 commits into
mainfrom
ievangelist-aspire-17-upgrade

Conversation

@IEvangelist

@IEvangelist David Pine (IEvangelist) commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Summary

Stage the repository-wide Aspire 17.0 upgrade ahead of the planned Tuesday release, and convert the golang-api sample to a Go AppHost.

  • Update C# AppHost SDKs, file-based AppHost directives, hosting/client integration packages, TypeScript SDK/package configuration, and integration-test package references to 17.0.0.
  • Align GitHub Actions, Azure Pipelines, Dev Container, documented CLI installation versions, and the standalone dashboard image with 17.0.
  • Temporarily use 17.0.0-preview.1.* for Aspire.Hosting.Java and Aspire.Npgsql.EntityFrameworkCore.PostgreSQL, which remain preview integrations. Replace these with exact published versions before merging.
  • Align directly conflicting Microsoft.Extensions.Hosting, EF Core, and OpenTelemetry dependency pins with the staged Aspire packages.
  • Migrate the database-containers apiservice resource to Project v2, retaining its existing project reference and resource configuration.
  • Convert samples/golang-api to a Go AppHost. apphost.go and go.mod replace the TypeScript AppHost, and aspire.config.json pins the SDK, Aspire.Hosting.Docker, and Aspire.Hosting.Go to 17.0.0. The AppHost runs the API with AddGoApp and WithModTidy, 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 in release/17.0). The API in api/ is unchanged.
  • Add a Validate Go AppHosts CI job. build/validate-go.sh runs aspire restore, go build, and go vet for every tracked samples/**/apphost.go, using Go 1.26 and the shared ASPIRE_CLI_VERSION pin, and CI Gate now requires the job. .gitattributes keeps *.go files 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 ade85493595286bb853ef410a395b93100cb2474 on November 13. The locally installed 17.0 CLI reports the same commit. Earlier broad staged checks used commit 4084327635a16237ab8d0babc07701493525f12b.

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 Gate now also depends on the new Validate Go AppHosts job. No checks are disabled or bypassed.

Validation and known blockers

  • The last completed Windows and Linux CI jobs failed with HTTP 404 while installing the unpublished 17.0 CLI; neither reached build or tests. The latest run for this review commit is in progress. Publication failures alone do not establish compatibility.
  • To investigate separately, used isolated temporary package caches and per-commit staged feeds for the two reference commits; no repository feed was changed. Staged artifacts are not proof of final release contents.
  • Targeted staged restores passed for ten AppHosts and the Azure Functions AppHost. Builds passed for Aspire Shop's CatalogDb and CatalogDbManager projects, vite-csharp-postgres/api, and image-gallery/api. CatalogDbManager emitted warnings that its MSBuild 18.11 dependencies are untested on .NET 10.
  • Self-review restored all 29 changed .csproj files against the current staged package snapshot. It caught and fixed two more NU1605 downgrades: image-gallery/worker now aligns EF Core SQL Server to 10.0.15 and OpenTelemetry Hosting to 1.18.0; polyglot-task-queue/worker-csharp aligns OpenTelemetry Hosting to 1.18.0. Both worker builds pass with no warnings.
  • The database-containers and Azure Functions AppHosts initially failed staged builds with CS0618 at legacy AddProject calls. The Azure Functions failure remains unresolved.
  • After the approved Project v2 migration, the database-containers AppHost builds against staged packages from both reference commits. ASPIREDOTNETPROJECT001 is suppressed only around the migrated declaration; ASPIRE012 remains because the AppHost SDK is retained.
  • Isolated legacy and migrated copies both reached healthy status and returned HTTP 200 on all nine sample routes with the earlier staged packages. The current-commit migrated copy also passed the same route and database-reference checks. The copies used unique disposable volumes and session-lifetime containers; the legacy copy demoted CS0618 to a warning only for comparison. Persistent-container and publishing parity remain unverified.
  • Full repository builds, generated TypeScript APIs, integration tests, publishing, and other samples' runtime behavior are not yet verified.

Go AppHost (folded in from #2111)

  • Validated in a scratch copy of the sample with 17.0.0-dev pins, 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, and gofmt passed; aspire run reached healthy in 9.0s and /health returned 200; aspire stop passed; aspire publish wrote docker-compose.yaml and .env; aspire do --list-steps listed 26 steps including docker-compose-down-env; aspire do build-api built an image whose /health returned 200. build/validate-go.sh passed bash -n and a stub-based test.
  • At a3b91c4, Validate Go AppHosts passes checkout and actions/setup-go, then fails at "Install Aspire CLI" with the same HTTP 404 for v17.0.0 as the other jobs, so it never reaches validation. CI Gate stays red until 17.0.0 is published.
  • Not verified: the released 17.0.0 CLI and packages; aspire deploy and docker compose up/down end to end (the published compose file reads the image from API_IMAGE, which the deploy flow is expected to supply); the dashboard UI; and the go-apphosts job past the CLI install (it installs no .NET SDK and relies on the SDK on the ubuntu-24.04 image).
  • Known gap: the original TypeScript AppHost pinned the published dashboard host port to 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 in release/17.0, so the pin can be restored once a CLI that includes the fix is available to verify it.
  • WithModTidy() runs go mod tidy -e, which can hide module download failures.

Before marking ready

  • Confirm the 17.0 CLI, NuGet packages, and dashboard image are published.
  • Confirm the 17.0 release includes the GHSA-f7vh-h5g3-7jrh security fix. At the reference commit above, release/17.0 still lacks the 13.6.5 dashboard tunnel restriction; microsoft/aspire#22170 describes the 17.0 backport as separate follow-up work.
  • Replace the temporary Java and PostgreSQL EF floating preview pins with their exact published versions.
  • Resolve remaining AddProject build errors and review the AppHost SDK deprecation and the .NET 10/MSBuild warnings without silently changing sample behavior.
  • Rerun the complete Windows/Linux CI build and integration tests; address any remaining 17.0 API, publishing, or runtime changes.
  • Confirm Aspire.Hosting.Go and Aspire.Hosting.Docker 17.0.0 are published, validate the Go AppHost with the released CLI (aspire restore, aspire run, aspire publish), and confirm Validate Go AppHosts passes on a real runner.
  • Restore the published dashboard host port pin (9003) in the Go AppHost with ConfigureDashboard, and verify it with a CLI that includes the Go AppHost: callbacks that take a resource builder receive nil and panic aspire#21255 fix.
  • Remove the temporary pre-release documentation notes.

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>
@IEvangelist
David Pine (IEvangelist) marked this pull request as ready for review November 14, 2026 05:34
Copilot AI balanced review requested due to automatic review settings November 14, 2026 05:34
@IEvangelist
David Pine (IEvangelist) marked this pull request as draft November 14, 2026 05:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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
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’ apiservice to 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
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.

[Go AppHost GA] Give the Go API sample a Go AppHost

2 participants