Aspire¶
The Aspire package generates .NET Aspire orchestration code from your Deepstaging declarations — Service Bus topology from [IntegrationEvents] and configuration bridges from [ConfigSection]. No manual topic/subscription wiring in your AppHost.
Package: Deepstaging.Hosting.Aspire
Quick Start¶
var builder = DistributedApplication.CreateBuilder(args);
var serviceBus = builder.AddAzureServiceBus("service-bus");
serviceBus.ConfigureServiceBusTopology(); // Generated — wires all topics and subscriptions
var postgres = builder.AddPostgres("postgres").AddDatabase("app-db");
builder.AddProject<Projects.eShop_Catalog>("catalog")
.WithReference(serviceBus)
.WithReference(postgres);
builder.Build().Run();
Service Bus Topology¶
The generator discovers [IntegrationEvents] and [IntegrationEventHandler] subscribers to produce one topic per event class and one subscription per handler class.
Config Bridge¶
Bridges Aspire's ConnectionStrings: section to Deepstaging [ConfigSection] paths:
AspireConfigBridge.MapConnectionStrings(builder,
postgresResource: "app-db",
cacheResource: "cache");
Diagnostics¶
| ID | Severity | Description |
|---|---|---|
| DSASP01 | Warning | [IntegrationEvents] found but .ConfigureServiceBusTopology() not called |
| DSASP02 | Warning | Manual AddServiceBusTopic() conflicts with generated topology |
| DSASP03 | Info | [ConfigSection] with connection strings but MapConnectionStrings() not called |