Dapr support for Aspire.
$ dotnet add package CommunityToolkit.Aspire.Hosting.DaprProvides extension methods and resource definitions for an Aspire AppHost to configure Dapr resources.
In your AppHost project, install the Aspire Dapr Hosting library with NuGet:
dotnet add package CommunityToolkit.Aspire.Hosting.Dapr
Then, in the Program.cs file of AppHost, add Dapr resources and consume the connection using the following methods:
var builder = DistributedApplication.CreateBuilder(args);
var stateStore = builder.AddDaprStateStore("statestore");
var pubSub = builder.AddDaprPubSub("pubsub");
builder.AddProject<Projects.MyApp>("myapp")
.WithDaprSidecar()
.WithReference(stateStore)
.WithReference(pubSub);
builder.Build().Run();
Note that Aspire is only tested for compatibility with the most recently stable version of Dapr. Currently 1.15.3 for the Dapr runtime and 1.15.0 for the Dapr CLI.