.NET Aspire for cloud-native app orchestration, service discovery, telemetry, and component integrations
From dotnet-blazornpx claudepluginhub markus41/claude --plugin dotnet-blazorThis skill is limited to using the following tools:
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Generates or updates index.md listing all files and subdirectories in a target folder with 3-10 word descriptions from file contents. Use for indexing documentation directories.
.NET Aspire is an opinionated, cloud-ready stack for building observable, production-ready, distributed applications. It provides:
// MyApp.AppHost/Program.cs
var builder = DistributedApplication.CreateBuilder(args);
// Infrastructure resources
var postgres = builder.AddPostgres("postgres").WithDataVolume().WithPgAdmin();
var redis = builder.AddRedis("redis").WithRedisInsight();
var rabbitmq = builder.AddRabbitMQ("messaging").WithManagementPlugin();
// Databases
var appDb = postgres.AddDatabase("appdb");
// Projects (services)
var api = builder.AddProject<Projects.Api>("api")
.WithReference(appDb)
.WithReference(redis)
.WithReference(rabbitmq)
.WithExternalHttpEndpoints();
var web = builder.AddProject<Projects.Web>("web")
.WithReference(api)
.WithReference(redis)
.WithExternalHttpEndpoints();
var worker = builder.AddProject<Projects.Worker>("worker")
.WithReference(rabbitmq)
.WithReference(appDb);
builder.Build().Run();
// ServiceDefaults/Extensions.cs (shared project)
public static IHostApplicationBuilder AddServiceDefaults(this IHostApplicationBuilder builder)
{
builder.ConfigureOpenTelemetry();
builder.AddDefaultHealthChecks();
builder.Services.AddServiceDiscovery();
builder.Services.ConfigureHttpClientDefaults(http =>
{
http.AddStandardResilienceHandler();
http.AddServiceDiscovery();
});
return builder;
}
| Component | NuGet Package | AddXxx Method |
|---|---|---|
| PostgreSQL (EF) | Aspire.Npgsql.EntityFrameworkCore.PostgreSQL | AddNpgsqlDbContext<T>() |
| SQL Server (EF) | Aspire.Microsoft.EntityFrameworkCore.SqlServer | AddSqlServerDbContext<T>() |
| Redis Cache | Aspire.StackExchange.Redis.DistributedCaching | AddRedisDistributedCache() |
| Redis Output Cache | Aspire.StackExchange.Redis.OutputCaching | AddRedisOutputCache() |
| RabbitMQ | Aspire.RabbitMQ.Client | AddRabbitMQClient() |
| Azure Service Bus | Aspire.Azure.Messaging.ServiceBus | AddAzureServiceBusClient() |
| Azure Blob Storage | Aspire.Azure.Storage.Blobs | AddAzureBlobClient() |
| Cosmos DB | Aspire.Microsoft.Azure.Cosmos | AddAzureCosmosClient() |
The Aspire dashboard provides:
Access at: https://localhost:18888 (default)
# Deploy to Azure Container Apps
azd init
azd provision # Creates Azure resources
azd deploy # Deploys all services
# Or use Aspire CLI
aspire publish --publisher azure
builder.AddServiceDefaults()WithReference() to establish service dependenciesWithExternalHttpEndpoints() for publicly accessible serviceshttps+http://service-name URIs