Ir al contenido
DocsTry Aspire
DocsTry

Get started with Dapr and Aspire

Esta página aún no está disponible en tu idioma.

⭐ Community Toolkit Dapr logo

Dapr is a portable runtime for building distributed applications with APIs for service invocation, state, messaging, secrets, and more. The Aspire Dapr integration models Dapr sidecars and component resources alongside the apps that use them.

  • Sidecars in the application model. Add and configure a Dapr sidecar next to an app resource instead of managing a separate dapr run command.
  • Reusable component resources. Model state stores, pub/sub brokers, and other Dapr components once, then reference them from sidecars.
  • Automatic endpoint injection. Aspire passes the sidecar HTTP and gRPC ports and endpoints to each app resource.
  • Dashboard visibility. Sidecars appear as resources with logs, endpoints, and lifecycle status in the Aspire dashboard.
  • Dapr SDK support. C#, TypeScript, Python, and Go apps can use the official Dapr SDK for their language.

Install the Dapr CLI and run:

Terminal
dapr init

The Community Toolkit package is tested with the most recent stable Dapr release identified in its source. At the audited release, that is Dapr runtime 1.15.3 and Dapr CLI 1.15.0.

architecture-beta

  group apphost(server)[AppHost]
  group consumer(server)[App resource]

  service component(database)[Dapr component] in apphost
  service sidecar(server)[Dapr sidecar] in apphost
  service app(server)[Application] in consumer

  component:R --> L:sidecar
  sidecar:R --> L:app
  1. Install the hosting integration, add component resources, and attach a sidecar to each app that uses Dapr.

    Set up Dapr in the AppHost

  2. Use the injected Dapr HTTP or gRPC endpoint with the official SDK for your app’s language.

    Connect to Dapr