Dapr SDK for .NET
Go to file
Ryan Nowak aa682eb462
Remove async void in tests (#447)
Fixes: #446

`async void` is almost always a bug in server-side programming. If these
tests were doing any networking then they would encounter concurrency
bugs or crash in the event of an exception.

Co-authored-by: vinayada1 <28875764+vinayada1@users.noreply.github.com>
2020-10-29 15:54:17 -07:00
.github Added codecov integration (#436) 2020-10-19 19:06:21 -07:00
docs Update Dapr docs links 2020-10-23 11:32:11 -07:00
properties Determine assembly, nuget versions based on git tags. (#366) 2020-08-10 13:58:27 -07:00
samples Fix: --dapr-http-port param is now --port (#451) 2020-10-29 14:20:02 -07:00
src Update Dapr docs links 2020-10-23 11:32:11 -07:00
test Remove async void in tests (#447) 2020-10-29 15:54:17 -07:00
.codecov.yml Added codecov integration (#436) 2020-10-19 19:06:21 -07:00
.editorconfig git gui, ading editor config and removing depenency on StyleCop.Analyzers (#228) 2020-02-18 13:21:12 -08:00
.gitignore Add coverlet output to gitignore (#448) 2020-10-28 12:56:35 -07:00
CODEOWNERS Create CODEOWNERS 2020-09-25 14:28:32 -07:00
CONTRIBUTING.md Update Dapr docs links 2020-10-23 11:32:11 -07:00
LICENSE Updating license to MIT in all .cs files. (#81) 2019-10-08 14:54:46 -07:00
README.md Update Dapr docs links 2020-10-23 11:32:11 -07:00
all.sln Remove secret store extension from building (#348) 2020-07-25 09:22:36 -07:00
azure-pipelines.yml Secret Store configuration provider implementation for Microsoft.Extensions.Configuration (#238) 2020-03-18 10:43:19 -07:00
global.json Document dotnet SDK requirements 2020-10-10 19:04:00 -07:00

README.md

Dapr SDK for .NET

Dapr is a portable, event-driven, serverless runtime for building distributed applications across cloud and edge.

Build Status Gitter codecov License: MIT

Dapr SDK for .NET allows you to 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.

This repo builds the following packages:

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

Getting Started

Prerequesites

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

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.

Solution Files

The repo currently has 4 solution files:

  • all.sln: This includes all the sdk product, test and samples project files.
  • src/prod.sln: This includes all the product project files.
  • samples/samples.sln: This includes all the sample projects files dependencies project files.
  • test/test.sln: This includes all the test projects and dependencies project files.

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 test/test.sln

# Generate nuget packages in /bin/Debug/nugets
dotnet pack src/prod.sln

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.

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.

Examples:

# 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

These articles will help get you started with Dapr runtime and Dapr Actors: