Skip to main content
net8.0

Dapr support for .NET Aspire.

Published
Oct 24, 2024
2y ago
Total Downloads
233.7K
233,742

Deprecated Package Version

Reason: Other

We will no longer be publishing new versions of this package. We recommend using the CommunityToolkit.Aspire.Hosting.Dapr package going forward.

Install

dotnet add package Aspire.Hosting.Dapr --version 8.2.2
ProductVersions
.NET
net8.0

README

Aspire.Hosting.Dapr library

Provides extension methods and resource definitions for a .NET Aspire AppHost to configure Dapr resources.

Getting started

Install the package

In your AppHost project, install the .NET Aspire Dapr Hosting library with NuGet:

dotnet add package Aspire.Hosting.Dapr

Usage example

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();

Additional documentation

https://dapr.io/

Feedback & contributing

https://github.com/dotnet/aspire

Changes from Previous Version

v8.2.1v8.2.2
Removed Dependencies

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

NuGet marks this package as deprecated and points to CommunityToolkit.Aspire.Hosting.Dapr as an alternative.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.The published metadata declares 16 direct dependency entries across framework groups. Inspect the resolved dependency graph for your target framework.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.