Skip to content

Commit 56e9b0a

Browse files
authored
Fixes #3224. Move Dapr to community toolkit (#3393)
1 parent 66248ac commit 56e9b0a

40 files changed

+20
-16
lines changed

.openpublishing.redirection.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,10 @@
283283
{
284284
"source_path_from_root": "/docs/deployment/azure/local-provisioning.md",
285285
"redirect_url": "/dotnet/aspire/azure/local-provisioning"
286+
},
287+
{
288+
"source_path_from_root": "/docs/frameworks/dapr.md",
289+
"redirect_url": "/dotnet/aspire/azure/dapr"
286290
}
287291
]
288292
}

docs/frameworks/dapr.md renamed to docs/community-toolkit/dapr.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
---
22
title: NET Aspire Dapr integration
33
description: Learn how to use the .NET Aspire Dapr integration, which can configure and orchestrate Dapr from a .NET Aspire app host project.
4-
ms.date: 01/16/2025
4+
ms.date: 05/12/2025
55
uid: frameworks/dapr
66
---
77

88
# .NET Aspire Dapr integration
99

10+
[!INCLUDE [includes-hosting](../includes/includes-hosting.md)]
11+
12+
[!INCLUDE [banner](includes/banner.md)]
13+
1014
[Distributed Application Runtime (Dapr)](https://docs.dapr.io/) offers developer APIs that serve as a conduit for interacting with other services and dependencies and abstract the application from the specifics of those services and dependencies. Dapr and .NET Aspire can work together to improve your local development experience. By using Dapr with .NET Aspire, you can focus on writing and implementing .NET-based distributed applications instead of local on-boarding.
1115

1216
In this guide, you'll learn how to take advantage of Dapr's abstraction and .NET Aspire's opinionated configuration of cloud technologies to build simple, portable, resilient, and secured microservices at scale.
@@ -30,9 +34,9 @@ At first sight Dapr and .NET Aspire may look like they have overlapping function
3034

3135
Dapr provides many [built-in components](https://docs.dapr.io/concepts/components-concept), and when you use Dapr with .NET Aspire you can easily explore and configure these components. Don't confuse these components with .NET Aspire integrations. For example, consider the following:
3236

33-
- [Dapr—State stores](https://docs.dapr.io/concepts/components-concept/#state-stores): Call <xref:Aspire.Hosting.IDistributedApplicationBuilderExtensions.AddDaprStateStore%2A> to add a configured state store to your .NET Aspire project.
34-
- [Dapr—Pub Sub](https://docs.dapr.io/concepts/components-concept/#pubsub-brokers): Call <xref:Aspire.Hosting.IDistributedApplicationBuilderExtensions.AddDaprPubSub%2A> to add a configured pub sub to your .NET Aspire project.
35-
- Dapr—Components: Call <xref:Aspire.Hosting.IDistributedApplicationBuilderExtensions.AddDaprComponent%2A> to add a configured integration to your .NET Aspire project.
37+
- [Dapr—State stores](https://docs.dapr.io/concepts/components-concept/#state-stores): Call `AddDaprStateStore` to add a configured state store to your .NET Aspire project.
38+
- [Dapr—Pub Sub](https://docs.dapr.io/concepts/components-concept/#pubsub-brokers): Call `AddDaprPubSub` to add a configured pub sub to your .NET Aspire project.
39+
- Dapr—Components: Call `AddDaprComponent` to add a configured integration to your .NET Aspire project.
3640

3741
## Install Dapr
3842

@@ -47,18 +51,18 @@ This integration requires Dapr version 1.13 or later. To install Dapr, see [Inst
4751
4852
## Hosting integration
4953
50-
In your .NET Aspire solution, to integrate Dapr and access its types and APIs, add the [📦 Aspire.Hosting.Dapr](https://www.nuget.org/packages/Aspire.Hosting.Dapr) NuGet package in the [app host](xref:dotnet/aspire/app-host) project.
54+
In your .NET Aspire solution, to integrate Dapr and access its types and APIs, add the [📦 CommunityToolkit.Aspire.Hosting.Dapr](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Dapr) NuGet package in the [app host](xref:dotnet/aspire/app-host) project.
5155
5256
### [.NET CLI](#tab/dotnet-cli)
5357
5458
```dotnetcli
55-
dotnet add package Aspire.Hosting.Dapr
59+
dotnet add package CommunityToolkit.Aspire.Hosting.Dapr
5660
```
5761
5862
### [PackageReference](#tab/package-reference)
5963

6064
```xml
61-
<PackageReference Include="Aspire.Hosting.Dapr"
65+
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Dapr"
6266
Version="*" />
6367
```
6468

@@ -70,7 +74,7 @@ For more information, see [dotnet add package](/dotnet/core/tools/dotnet-add-pac
7074

7175
Dapr uses the [sidecar pattern](https://docs.dapr.io/concepts/dapr-services/sidecar/). The Dapr sidecar runs alongside your app as a lightweight, portable, and stateless HTTP server that listens for incoming HTTP requests from your app.
7276

73-
To add a sidecar to a .NET Aspire resource, call the <xref:Aspire.Hosting.IDistributedApplicationResourceBuilderExtensions.WithDaprSidecar%2A> method on it. The `appId` parameter is the unique identifier for the Dapr application, but it's optional. If you don't provide an `appId`, the parent resource name is used instead.
77+
To add a sidecar to a .NET Aspire resource, call the `WithDaprSidecar` method on it. The `appId` parameter is the unique identifier for the Dapr application, but it's optional. If you don't provide an `appId`, the parent resource name is used instead.
7478

7579
:::code language="csharp" source="snippets/Dapr/Dapr.AppHost/Program.cs" range="1-7" highlight="7":::
7680

0 commit comments

Comments
 (0)