Skip to content
Switch branches/tags

Latest commit

* Fix missing assignment

ActorHost.JsonSerializerOptions is always null.

Signed-off-by: mumumi <>

* Add test for custom json options

Signed-off-by: mumumi <>

Co-authored-by: halspang <>

Git stats


Failed to load latest commit information.

Dapr SDK for .NET

Build Status codecov License: Apache

Dapr SDK for .NET allows you to:

  • Interact with Dapr applications through a Dapr client
  • Build routes and controllers in ASP.NET
  • Implement the Virtual Actor model, based on the actor design pattern

This SDK can run locally, in a container, and in any distributed systems environment.


We publish nuget packages to for each release.

Using nugets built locally in your project

<RepoRoot> is the path where you cloned this repository. Nuget packages are dropped under /bin/<Debug|Release>/nugets when you build locally.


# Add Dapr.Actors nuget package
dotnet add package Dapr.Actors -s <RepoRoot>/bin/<Debug|Release>/nugets

# Add Dapr.Actors.AspNetCore nuget package
dotnet add package Dapr.Actors.AspNetCore -s <RepoRoot>/bin/<Debug|Release>/nugets


The docs for the Dapr .NET SDK can be found on the Dapr docs site.


Visit the examples folder for a variety of examples to get you up and running with the Dapr .NET SDK.


This repo builds the following packages:

  • Dapr.Client
  • Dapr.AspNetCore
  • Dapr.Actors
  • Dapr.Actors.AspNetCore
  • Dapr.Extensions.Configuration


Each project is a normal C# project. At minimum, you need .NET 5.0 SDK to build, test, and generate NuGet packages.

Also make sure to reference the .NET SDK contribution guide


On macOS or Linux we recommend Visual Studio Code with the C# Extension. See here for a getting started guide for VS Code and .NET.


On Windows, we recommend installing the latest Visual Studio 2019 which will set you up with all the .NET build tools and allow you to open the solution files. Community Edition is free and can be used to build everything here.

Make sure you update Visual Studio to the most recent release.


To build everything and generate NuGet packages, run dotnet cli commands. Binaries and NuGet packages will be dropped in a bin directory at the repo root.

# Build sdk, samples and tests.
dotnet build -c Debug  # for release, -c Release

# Run unit-test
dotnet test

# Generate nuget packages in /bin/Debug/nugets
dotnet pack

Each project can also be built individually directly through the CLI or your editor/IDE. You can open the solution file all.sln in repo root to load all sdk, samples and test projects.