Skip to content
bitzorcas
EN

Guide

Aspire orchestration

.NET Aspire local orchestration — AppHost setup with SQL Server and RabbitMQ resources, service discovery, and OTLP injection.

Last updated

BitzOrcas uses .NET Aspire for local development orchestration. The BitzOrcas.AppHost project manages SQL Server, RabbitMQ, and the API service.

AppHost Program.cs

var builder = DistributedApplication.CreateBuilder(args);
// Infrastructure resources
var sqlServer = builder.AddSqlServer("sqlserver")
.AddDatabase("bitzorcas");
var rabbitMq = builder.AddRabbitMQ("rabbitmq");
// API service
var api = builder.AddProject<Projects.BitzOrcas_Api>("api")
.WithReference(sqlServer)
.WithReference(rabbitMq);
builder.Build().Run();

What Aspire provides

  • Service discovery: API finds SQL Server and RabbitMQ without hardcoded connections
  • OTLP injection: OpenTelemetry endpoint automatically configured
  • Health check dashboard: Visual health status of all services
  • Resource lifecycle: Start/stop infrastructure together

Running

Terminal window
dotnet run --project src/Hosts/BitzOrcas.AppHost

Opens Aspire dashboard at http://localhost:5050.

Dependencies

<PackageReference Include="Aspire.Hosting.SqlServer" />
<PackageReference Include="Aspire.Hosting.RabbitMQ" />

See also