Skip to content

Move the Aspire sample to Aspire.AppHost.Sdk 13.6.3 with a PostgreSQL resource; drop the workload step (#5724) - #5748

Merged
jeremydmiller merged 1 commit into
masterfrom
gh-5724-aspire-sample
Oct 23, 2026
Merged

jeremydmiller merged 1 commit into
masterfrom
gh-5724-aspire-sample

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Closes #5724.

AppHost

  • src/samples/AspireHost moves from the workload-era <IsAspireHost> with Aspire.Hosting.AppHost 8.2.0 to <Project Sdk="Aspire.AppHost.Sdk/13.6.3">. 13.6.3 shipped after the issue named 13.6.2.
  • The SDK references Aspire.Hosting.AppHost implicitly, so its central PackageVersion entry is removed; keeping it is NU1009. A comment in Directory.Packages.props says to keep Aspire.Hosting.PostgreSQL 13.6.3 in step with the Sdk version.
  • The AppHost now provisions PostgreSQL with AddPostgres("postgres").AddDatabase("marten"). Both services get WithReference and WaitFor.
  • IncludeMartenDedupeAliases=false on the AppHost: it references no Marten, JasperFx or Weasel assembly, so the repository-wide global-using aliases had nothing to bind to.

Services: one deviation from the issue's proposal

EventPublisher and AspireHeadlessTripService read ConnectionStrings:marten from Aspire, falling back to the test connection string when run on their own.

The issue proposed AddNpgsqlDataSource("marten") plus UseNpgsqlDataSource(). Both services are database-per-tenant (MultiTenantedWithSingleServer), which needs the server's connection string to create each tenant's database, not one NpgsqlDataSource. They therefore read the string, and a comment at each call site says why. The single-database UseNpgsqlDataSource() path is already the one shown in docs/getting-started.md.

Stale sample code

AspireHeadlessTripService had not compiled for some time: it used the stale Marten.Events.Daemon.Resiliency namespace and old projection namespaces. It is in no solution, so nothing noticed. Fixed here.

Publish workflow

on-manual-do-nuget-publish.yml no longer runs dotnet workload install aspire. That workload has been obsolete since Aspire 9, and ./build.sh pack does not build the sample.

Verified

dotnet build src/samples/AspireHost/AspireHost.csproj builds the AppHost and both services with 0 errors. I did not launch the AppHost; that needs Docker and the Aspire dashboard.

🤖 Generated with Claude Code

… resource; drop the workload step (#5724)

- src/samples/AspireHost is on Aspire.AppHost.Sdk/13.6.3 instead of the workload-era IsAspireHost with
  Aspire.Hosting.AppHost 8.2.0. The SDK references Aspire.Hosting.AppHost implicitly, so its central
  PackageVersion entry is removed (NU1009). Aspire.Hosting.PostgreSQL 13.6.3 added.
- The AppHost provisions PostgreSQL (AddPostgres + AddDatabase) and passes it to both services with
  WithReference + WaitFor. The services read ConnectionStrings:marten, falling back to the test
  connection string when run on their own. Both are database-per-tenant (MultiTenantedWithSingleServer),
  which needs the server's connection string, so they read the string rather than using
  AddNpgsqlDataSource + UseNpgsqlDataSource().
- AspireHeadlessTripService had not compiled for some time (stale Marten.Events.Daemon.Resiliency and
  projection namespaces). It is in no solution, so nothing noticed.
- The publish workflow no longer installs the aspire workload, obsolete since Aspire 9. ./build.sh pack
  does not build the sample.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeremydmiller
jeremydmiller merged commit 10fdfc1 into master Oct 23, 2026
32 checks passed
@jeremydmiller
jeremydmiller deleted the gh-5724-aspire-sample branch October 23, 2026 17:40
This was referenced Oct 24, 2026
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.

Aspire sample pins Aspire.Hosting.AppHost 8.2.0 (workload era) and the publish workflow still installs the aspire workload

1 participant