Dapr SDK for .NET
Go to file
Anton Troshin fbb7a814bb
update proto (#1327)
Signed-off-by: Anton Troshin <anton@diagrid.io>
Signed-off-by: Anton Troshin <troll.sic@gmail.com>
2024-07-23 09:39:33 -07:00
.devcontainer Dapr runtime and .NET reference updates. (#1323) 2024-07-09 10:45:33 -07:00
.github Dapr runtime and .NET reference updates. (#1323) 2024-07-09 10:45:33 -07:00
daprdocs Dapr runtime and .NET reference updates. (#1323) 2024-07-09 10:45:33 -07:00
docs SDK Docs (#572) 2021-02-16 22:15:33 -08:00
examples Dapr runtime and .NET reference updates. (#1323) 2024-07-09 10:45:33 -07:00
properties Consolidate C# language version to 10. (#1180) 2023-11-13 15:20:01 -08:00
samples/Client Dapr runtime and .NET reference updates. (#1323) 2024-07-09 10:45:33 -07:00
src update proto (#1327) 2024-07-23 09:39:33 -07:00
test Added overload to support SDK supplying query string on invoked URL (#1310) 2024-07-03 10:47:54 -07:00
.codecov.yml Added codecov integration (#436) 2020-10-19 19:06:21 -07:00
.editorconfig [Workflow] Improve management API usability (#1087) 2023-05-12 15:44:33 -07:00
.gitignore Implement Bulk Publish functionality (#1001) 2023-01-26 11:34:09 -08:00
CODEOWNERS Update CODEOWNERS 2021-07-13 11:30:41 -07:00
CONTRIBUTING.md Add DCO requirements and updated code of conduct (#808) 2022-01-06 10:35:50 -08:00
LICENSE replaced license headers (#802) 2021-12-10 13:39:06 -08:00
README.md Fixed badge broken links (#1290) 2024-05-21 21:25:19 -07:00
all.sln Samples - Add k8s deployment yaml to DemoActor sample (#1308) 2024-06-26 09:19:53 -07:00
global.json Add net7 to testing matrix (#1005) 2023-01-26 11:00:43 -08:00

README.md

Dapr SDK for .NET

NuGet Version NuGet Downloads GitHub Actions Workflow Status codecov GitHub License GitHub issue custom search in repo Discord YouTube Channel Views X (formerly Twitter) Follow

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.

Releases

We publish nuget packages to nuget.org 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.

Example

# 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

Documentation

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

Examples

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

Contributing

This repo builds the following packages:

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

Prerequisites

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

Also make sure to reference the .NET SDK contribution guide

macOS/Linux:

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.

Windows:

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.

Build

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.