Skip to content

GH-5124 Aspire samples on Aspire 13.6.3 with shared service defaults, in wolverine.slnx - #5182

Merged
jeremydmiller merged 1 commit into
mainfrom
gh-5124-aspire-samples
Oct 23, 2026
Merged

jeremydmiller merged 1 commit into
mainfrom
gh-5124-aspire-samples

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

What changed

  • Aspire 13.6.3 (latest stable 13.x on nuget.org; Aspire.Hosting.AppHost ships net8.0/net9.0/net10.0 assets) for both src/Samples/AspireWithRabbitMq and src/Samples/AspireWithKafka. The AppHosts use <Project Sdk="Aspire.AppHost.Sdk/13.6.3">; Aspire.Hosting.RabbitMQ / Aspire.Hosting.Kafka are pinned in Directory.Packages.props. The old PackageReference Version="9.1.0" could not even restore under central package management. ASPIRE010 (no Aspire CLI bundle) is suppressed in the AppHosts, since they run with dotnet run on the dashboard/DCP packages the SDK references.
  • New src/Samples/AspireServiceDefaults, shared by all four services: OpenTelemetry with AddSource("Wolverine") and AddMeter("Wolverine*"), OTLP export when Aspire sets OTEL_EXPORTER_OTLP_ENDPOINT, and /health + /alive. The services call AddServiceDefaults() / MapDefaultEndpoints(); the AppHosts add WithHttpHealthCheck("/health"). The services already used UseRabbitMqUsingNamedConnection / UseKafkaUsingNamedConnection.
  • Services are now Microsoft.NET.Sdk.Web apps (needed for the health endpoints) with launch profiles, and reference Wolverine.RuntimeCompilation. Without it they failed at startup.
  • Fixed latent bugs that showed up once the samples were built and run: Ponger was missing a using, and PingerService/PublisherService injected the scoped IMessageBus into a singleton hosted service, which fails scope validation in Development (so it always failed under Aspire).
  • wolverine.slnx: all eight projects added. They are all single-target net9.0, so the pinned -f net9.0 Compile builds them with no NETSDK1005 risk, and no Build Project="false" entry is needed.
  • docs/guide/aspire.md: startup gates are cloned Aspire project resources that the service waits on with WaitForCompletion (checked against JasperFxAspireStartupExtensions.ApplyGates in JasperFx 2.93.1). Only the dashboard buttons spawn a dotnet run --no-build child process. Also added a short "Traces, Metrics and Health Checks" section that embeds the service defaults via mdsnippets.

Verified locally

  • MSBUILDDISABLENODEREUSE=1 dotnet build wolverine.slnx -c Release -f net9.0: 0 errors. The 3 warnings are the existing MessagePack NU1902 advisories, and the build log shows all 8 Aspire projects built.
  • Both AppHosts built on their own: 0 warnings, 0 errors.
  • Ran both AppHosts end to end with dotnet run. Aspire started the RabbitMQ/Kafka containers and both services, /health and /alive returned Healthy 200 through the DCP proxies, and messages flowed (about 50 ping/pong and about 65 order publish/handle log lines in a minute).

Not done: a CI target for the samples (CI is off today), left as a follow-up.

Closes #5124

🤖 Generated with Claude Code

https://claude.ai/code/session_01DCggXgxnG3EBXoR9rrq37U

… in wolverine.slnx

- AspireWithRabbitMq and AspireWithKafka AppHosts move from Aspire.AppHost.Sdk 9.1.0 to 13.6.3
  (Aspire.Hosting.RabbitMQ/Kafka pinned centrally in Directory.Packages.props); the old
  PackageReference Version= attributes could not restore under central package management
- New src/Samples/AspireServiceDefaults: OpenTelemetry with AddSource("Wolverine") and
  AddMeter("Wolverine*"), OTLP export when Aspire sets OTEL_EXPORTER_OTLP_ENDPOINT, and
  /health + /alive endpoints; the four sample services use it and the AppHosts poll /health
- Sample services are now web apps (needed for the health endpoints) and reference
  Wolverine.RuntimeCompilation, without which they failed at startup
- Fixed latent sample bugs the build/run exposed: Ponger missed a using, and the hosted services
  took the scoped IMessageBus into a singleton (fails scope validation in Development)
- All eight projects are net9.0 and in wolverine.slnx, so the pinned net9.0 Compile builds them
- docs/guide/aspire.md: startup gates are cloned project resources the service waits on with
  WaitForCompletion, not child processes; only the dashboard buttons spawn a child process.
  New section on traces, metrics and health checks using the service defaults sample

Closes #5124

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DCggXgxnG3EBXoR9rrq37U
@jeremydmiller
jeremydmiller merged commit 25cba1c into main Oct 23, 2026
@jeremydmiller jeremydmiller mentioned this pull request Oct 23, 2026
This was referenced Oct 25, 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 samples are on SDK 9.1.0 / net9, outside wolverine.slnx and never built; docs/guide/aspire.md misdescribes startup gates

1 participant