Compare commits

..

No commits in common. "v1.16.0-rc02" and "master" have entirely different histories.

80 changed files with 231 additions and 144 deletions

View File

@ -20,8 +20,18 @@ jobs:
strategy:
fail-fast: false
matrix:
dotnet-version: ['8.0', '9.0']
dotnet-version: ['6.0', '7.0', '8.0', '9.0']
include:
- dotnet-version: '6.0'
display-name: '.NET 6.0'
framework: 'net6'
prefix: 'net6'
install-version: '6.0.x'
- dotnet-version: '7.0'
display-name: '.NET 7.0'
framework: 'net7'
prefix: 'net7'
install-version: '7.0.x'
- dotnet-version: '8.0'
display-name: '.NET 8.0'
framework: 'net8'
@ -40,7 +50,7 @@ jobs:
GOPROXY: https://proxy.golang.org
DAPR_CLI_VER: 1.15.0
DAPR_RUNTIME_VER: 1.15.3
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/release-1.15/install/install.sh
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/release-1.14/install/install.sh
DAPR_CLI_REF: ''
steps:
- name: Set up Dapr CLI
@ -114,11 +124,9 @@ jobs:
with:
dotnet-version: '9.0.x'
dotnet-quality: 'ga'
- name: Restore dependencies
run: dotnet restore
- name: Build
# disable deterministic builds, just for test run. Deterministic builds break coverage for some reason
run: dotnet build --configuration release --no-restore /p:GITHUB_ACTIONS=false
run: dotnet build --configuration release /p:GITHUB_ACTIONS=false
- name: Run General Tests
id: tests
continue-on-error: true # proceed if tests fail, the report step will report the failure with more details.

View File

@ -5,7 +5,6 @@ on:
branches:
- master
- release-*
- durabletask-fork
tags:
- v*
@ -13,7 +12,6 @@ on:
branches:
- master
- release-*
- durabletask-fork
jobs:
build:
@ -30,10 +28,8 @@ jobs:
with:
dotnet-version: 9.0.x
dotnet-quality: 'ga'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration release --no-restore
run: dotnet build --configuration release
- name: Generate Packages
run: dotnet pack --configuration release
- name: Upload packages
@ -48,8 +44,18 @@ jobs:
strategy:
fail-fast: false
matrix:
dotnet-version: ['8.0', '9.0']
dotnet-version: ['6.0', '7.0', '8.0', '9.0']
include:
- dotnet-version: '6.0'
display-name: '.NET 6.0'
framework: 'net6'
prefix: 'net6'
install-version: '6.0.x'
- dotnet-version: '7.0'
display-name: '.NET 7.0'
framework: 'net7'
prefix: 'net7'
install-version: '7.0.x'
- dotnet-version: '8.0'
display-name: '.NET 8.0'
framework: 'net8'

View File

@ -54,13 +54,13 @@ This section describes the guidelines for contributing code / docs to Dapr.
All contributions come through pull requests. To submit a proposed change, we recommend following this workflow:
1. Make sure there's an issue (bug or proposal) raised, which sets the expectations for the contribution you are about to make.
2. Fork the relevant repo and create a new branch
3. Create your change
1. Fork the relevant repo and create a new branch
1. Create your change
- Code changes require tests
4. Update relevant documentation for the change
5. Commit and open a PR
6. Wait for the CI process to finish and make sure all checks are green
7. A maintainer of the project will be assigned, and you can expect a review within a few days
1. Update relevant documentation for the change
1. Commit and open a PR
1. Wait for the CI process to finish and make sure all checks are green
1. A maintainer of the project will be assigned, and you can expect a review within a few days
#### Use work-in-progress PRs for early feedback

View File

@ -5,66 +5,48 @@
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
<PackageVersion Include="coverlet.collector" Version="6.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="coverlet.msbuild" Version="6.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="Dapr.DurableTask.Client.Grpc" Version="1.15.6" />
<PackageVersion Include="Dapr.DurableTask.Worker.Grpc" Version="1.15.6" />
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="Google.Api.CommonProtos" Version="2.16.0" />
<PackageVersion Include="Google.Protobuf" Version="3.31.0" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="coverlet.msbuild" Version="6.0.2" />
<PackageVersion Include="GitHubActionsTestLogger" Version="1.1.2" />
<PackageVersion Include="Google.Api.CommonProtos" Version="2.2.0" />
<PackageVersion Include="Google.Protobuf" Version="3.30.2" />
<PackageVersion Include="Grpc.AspNetCore" Version="2.71.0" />
<PackageVersion Include="Grpc.Core.Testing" Version="2.46.6" />
<PackageVersion Include="Grpc.Net.Client" Version="2.71.0" />
<PackageVersion Include="Grpc.Net.ClientFactory" Version="2.71.0" />
<PackageVersion Include="Grpc.Tools" Version="2.72.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.16" Condition="'$(TargetFramework)' == 'net8'" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.5" Condition="'$(TargetFramework)' == 'net9'" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="8.0.16" Condition="'$(TargetFramework)' == 'net8'" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="9.0.5" Condition="'$(TargetFramework)' == 'net9'" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" />
<PackageVersion Include="Grpc.Tools" Version="2.71.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.35" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="6.0.35" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.8.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" Version="1.1.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit" Version="1.1.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.14.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="9.0.5" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.5" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.5" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.5" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.5" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.5" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="9.0.5" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="9.0.5" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="MinVer" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" />
<PackageVersion Include="Microsoft.DurableTask.Client.Grpc" Version="1.10.0" />
<PackageVersion Include="Microsoft.DurableTask.Worker.Grpc" Version="1.10.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.4" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageVersion Include="MinVer" Version="2.3.0" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="protobuf-net.Grpc.AspNetCore" Version="1.2.2" />
<PackageVersion Include="Serilog.AspNetCore" Version="9.0.0" />
<PackageVersion Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageVersion Include="Serilog.Sinks.File" Version="7.0.0" />
<PackageVersion Include="Shouldly" Version="4.3.0" />
<PackageVersion Include="Serilog.AspNetCore" Version="6.1.0" />
<PackageVersion Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageVersion Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageVersion Include="Shouldly" Version="4.2.1" />
<PackageVersion Include="System.Formats.Asn1" Version="6.0.1" />
<PackageVersion Include="System.Text.Encodings.Web" Version="9.0.5" />
<PackageVersion Include="System.Text.Json" Version="9.0.5" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.extensibility.core" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="System.Text.Json" Version="6.0.10" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.extensibility.core" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
</ItemGroup>
</Project>

View File

@ -44,21 +44,12 @@ This repo builds the following packages:
- Dapr.AspNetCore
- Dapr.Actors
- Dapr.Actors.AspNetCore
- Dapr.Actors.Generators
- Dapr.AI
- Dapr.Jobs
- Dapr.Messaging
- Dapr.Extensions.Configuration
- Dapr.Workflow
It also builds the following packages which are not intended for public use and contain common types used in the packages above:
- Dapr.Common
- Dapr.Protos
### Prerequisites
Each project is a normal C# project. At minimum, you need [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0) to build, test, and generate NuGet packages.
Each project is a normal C# project. At minimum, you need [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet/6.0) to build, test, and generate NuGet packages.
Also make sure to reference the [.NET SDK contribution guide](https://docs.dapr.io/contributing/sdk-contrib/dotnet-contributing/)
@ -68,7 +59,7 @@ On macOS or Linux we recommend [Visual Studio Code](https://code.visualstudio.co
**Windows:**
On Windows, we recommend installing [the latest Visual Studio 2022](https://www.visualstudio.com/vs/) 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.
On Windows, we recommend installing [the latest Visual Studio 2019](https://www.visualstudio.com/vs/) 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](https://docs.microsoft.com/visualstudio/install/update-visual-studio).

View File

@ -101,8 +101,17 @@ squashing the PR locally and resubmitting to ensure that the sign-off statement
# Languages, Tools and Processes
All source code in the Dapr .NET SDK is written in C# and targets the latest language version available to the earliest
supported .NET SDK. As of v1.16, this means that both .NET 8 and .NET 9 are supported. The latest language version available
is [C# version 12](https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history#c-version-12)
supported .NET SDK. As of v1.15, this means that because .NET 6 is still supported, the latest language version available
is [C# version 10](https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history#c-version-10).
As of v1.15, the following versions of .NET are supported:
| Version | Notes |
| --- |-----------------------------------------------------------------|
| .NET 6 | Will be discontinued in v1.16 |
| .NET 7 | Only supported in Dapr.Workflows, will be discontinued in v1.16 |
| .NET 8 | Will continue to be supported in v1.16 |
| .NET 9 | Will continue to be supported in v1.16 |
Contributors are welcome to use whatever IDE they're most comfortable developing in, but please do not submit
IDE-specific preference files along with your contributions as these will be rejected.

View File

@ -18,7 +18,15 @@ Dapr offers a variety of packages to help with the development of .NET applicati
- [Dapr CLI]({{< ref install-dapr-cli.md >}}) installed
- Initialized [Dapr environment]({{< ref install-dapr-selfhost.md >}})
- [.NET 8](https://dotnet.microsoft.com/download) or [.NET 9](https://dotnet.microsoft.com/download) installed
- [.NET 6](https://dotnet.microsoft.com/download), [.NET 8](https://dotnet.microsoft.com/download) or [.NET 9](https://dotnet.microsoft.com/download) installed
{{% alert title="Note" color="primary" %}}
Note that while .NET 6 is generally supported as the minimum .NET requirement across the Dapr .NET SDK packages
and .NET 7 is the minimally supported version of .NET by Dapr.Workflows in Dapr v1.15, only .NET 8 and .NET 9 will
continue to be supported by Dapr in v1.16 and later.
{{% /alert %}}
## Installation

View File

@ -45,7 +45,15 @@ This project contains the implementation of the actor client which calls MyActor
- [Dapr CLI]({{< ref install-dapr-cli.md >}}) installed.
- Initialized [Dapr environment]({{< ref install-dapr-selfhost.md >}}).
- [.NET 8](https://dotnet.microsoft.com/download) or [.NET 9](https://dotnet.microsoft.com/download) installed
- [.NET 6](https://dotnet.microsoft.com/download), [.NET 8](https://dotnet.microsoft.com/download) or [.NET 9](https://dotnet.microsoft.com/download) installed
{{% alert title="Note" color="primary" %}}
Note that while .NET 6 is generally supported as the minimum .NET requirement across the Dapr .NET SDK packages
and .NET 7 is the minimally supported version of .NET by Dapr.Workflows in Dapr v1.15, only .NET 8 and .NET 9 will
continue to be supported by Dapr in v1.16 and later.
{{% /alert %}}
## Step 0: Prepare

View File

@ -7,10 +7,17 @@ description: Learn how to create and use the Dapr Conversational AI client using
---
## Prerequisites
- [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0), or [.NET 9](https://dotnet.microsoft.com/download/dotnet/9.0) installed
- [.NET 6](https://dotnet.microsoft.com/download/dotnet/6.0), [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0), or [.NET 9](https://dotnet.microsoft.com/download/dotnet/9.0) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost)
{{% alert title="Note" color="primary" %}}
.NET 6 is supported as the minimum required for the Dapr .NET SDK packages in this release. Only .NET 8 and .NET 9
will be supported in Dapr v1.16 and later releases.
{{% /alert %}}
## Installation
To get started with the Dapr AI .NET SDK client, install the [Dapr.AI package](https://www.nuget.org/packages/Dapr.AI) from NuGet:

View File

@ -24,11 +24,13 @@ Amazon AWS, deployment is currently outside the scope of this guide. More inform
documentation [here](https://learn.microsoft.com/en-us/dotnet/aspire/deployment/overview).
## Prerequisites
- Both the Dapr .NET SDK and .NET Aspire are compatible with [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0)
or [.NET 9](https://dotnet.microsoft.com/download/dotnet/9.0)
- While the Dapr .NET SDK is compatible with [.NET 6](https://dotnet.microsoft.com/download/dotnet/6.0),
[.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0) or [.NET 9](https://dotnet.microsoft.com/download/dotnet/9.0),
.NET Aspire is only compatible with [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0) or
[.NET 9](https://dotnet.microsoft.com/download/dotnet/9.0).
- An OCI compliant container runtime such as [Docker Desktop](https://www.docker.com/products/docker-desktop) or
[Podman](https://podman.io/)
- Install and initialize Dapr v1.16 or later
- Install and initialize Dapr v1.13 or later
## Using .NET Aspire via CLI

View File

@ -18,9 +18,15 @@ In the .NET example project:
## Prerequisites
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost)
- [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0) or [.NET 9](https://dotnet.microsoft.com/download/dotnet/9.0) installed
- [.NET 6](https://dotnet.microsoft.com/download/dotnet/6.0), [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0) or [.NET 9](https://dotnet.microsoft.com/download/dotnet/9.0) installed
- [Dapr.Jobs](https://www.nuget.org/packages/Dapr.Jobs) NuGet package installed to your project
{{% alert title="Note" color="primary" %}}
Note that while .NET 6 is the minimum support version of .NET in Dapr v1.15, only .NET 8 and .NET 9 will continue to be supported by Dapr in v1.16 and later.
{{% /alert %}}
## Set up the environment
Clone the [.NET SDK repo](https://github.com/dapr/dotnet-sdk).

View File

@ -17,9 +17,15 @@ runtime and which do not require an endpoint to be pre-configured. In this guide
## Prerequisites
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost)
- [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0) or [.NET 9](https://dotnet.microsoft.com/download/dotnet/9.0) installed
- [.NET 6](https://dotnet.microsoft.com/download/dotnet/6.0), [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0) or [.NET 9](https://dotnet.microsoft.com/download/dotnet/9.0) installed
- [Dapr.Messaging](https://www.nuget.org/packages/Dapr.Messaging) NuGet package installed to your project
{{% alert title="Note" color="primary" %}}
Note that while .NET 6 is the minimum support version of .NET in Dapr v1.15, only .NET 8 and .NET 9 will continue to be supported by Dapr in v1.16 and later.
{{% /alert %}}
## Set up the environment
Clone the [.NET SDK repo](https://github.com/dapr/dotnet-sdk).

View File

@ -20,7 +20,14 @@ In the .NET example project:
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0) or [.NET 9](https://dotnet.microsoft.com/download/dotnet/9.0) installed
- [.NET 7](https://dotnet.microsoft.com/download/dotnet/7.0), [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0) or [.NET 9](https://dotnet.microsoft.com/download/dotnet/9.0) installed
{{% alert title="Note" color="primary" %}}
Dapr.Workflows supports .NET 7 or newer in v1.15. However, following the release of Dapr v1.16, only
.NET 8 and .NET 9 will be supported.
{{% /alert %}}
## Set up the environment

View File

@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>
<ItemGroup>

View File

@ -1,5 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<IsPublishable>true</IsPublishable>
<EnableSdkContainerSupport>true</EnableSdkContainerSupport>

View File

@ -1,5 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Dapr.Actors\Dapr.Actors.csproj" />
</ItemGroup>

View File

@ -4,7 +4,7 @@ The Actor example shows how to create a virtual actor (`DemoActor`) and invoke i
## Prerequisites
- [.NET 8+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://github.com/dapr/dotnet-sdk/)

View File

@ -1,5 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Dapr.AspNetCore\Dapr.AspNetCore.csproj" />
</ItemGroup>

View File

@ -12,7 +12,7 @@ The application also registers for pub/sub with the `deposit`, `multideposit` an
## Prerequisitess
- [.NET 8+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)

View File

@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6</TargetFramework>
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
</PropertyGroup>

View File

@ -11,7 +11,7 @@ The application also registers for pub/sub with the `deposit` and `withdraw` top
## Prerequisitess
- [.NET 8+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)

View File

@ -12,7 +12,7 @@ The application also registers for pub/sub with the `deposit`, `multideposit`, a
## Prerequisites
- [.NET 8+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)

View File

@ -1,5 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Dapr.AspNetCore\Dapr.AspNetCore.csproj" />
</ItemGroup>

View File

@ -2,7 +2,7 @@
## Prerequisites
- [.NET 8+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>
<ItemGroup>

View File

@ -1,4 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Dapr.Client\Dapr.Client.csproj" />
<ProjectReference Include="..\..\..\src\Dapr.AspNetCore\Dapr.AspNetCore.csproj" />

View File

@ -9,7 +9,7 @@ It demonstrates the following APIs:
## Prerequisites
- [.NET 8+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>

View File

@ -1,7 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<ItemGroup>
<ProjectReference Include="..\..\..\src\Dapr.AspNetCore\Dapr.AspNetCore.csproj" />
<ProjectReference Include="..\..\..\src\Dapr.Client\Dapr.Client.csproj" />
<ProjectReference Include="..\..\..\src\Dapr.Common\Dapr.Common.csproj" />
</ItemGroup>
<PropertyGroup>
<TargetFramework>net6</TargetFramework>
</PropertyGroup>
</Project>

View File

@ -2,13 +2,13 @@
## Prerequisites
- [.NET 8+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)
## Distributed Lock API
Dapr 1.8 introduced the Distributed Lock API. This API can be used to prevent multiple processes from accessing the same resource. In Dapr, locks are scoped to a specific App ID.
Dapr 1.8 introduces the Distributed Lock API. This API can be used to prevent multiple processes from accessing the same resource. In Dapr, locks are scoped to a specific App ID.
For this example, we will be running multiple instances of the same application to demonstrate an event driven consumer pattern. This example also includes a simple generator that creates some data that can be processed.

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6</TargetFramework>
<RootNamespace>Samples.Client</RootNamespace>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -2,7 +2,7 @@
## Prerequisites
- [.NET 8+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6</TargetFramework>
<RootNamespace>Samples.Client</RootNamespace>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -2,7 +2,7 @@
## Prerequisites
- [.NET 8+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -2,7 +2,7 @@
## Prerequisites
- [.NET 8+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6</TargetFramework>
<RootNamespace>Samples.Client</RootNamespace>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -2,7 +2,7 @@
## Prerequisites
- [.NET 8+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6</TargetFramework>
<RootNamespace>Samples.Client</RootNamespace>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -2,7 +2,6 @@
<Import Project="$(MSBuildThisFileDirectory)..\properties\dapr_managed_netcore.props" />
<PropertyGroup>
<TargetFrameworks>net8;net9</TargetFrameworks>
<!-- Set Output Path for samples-->
<OutputPath>$(RepoRoot)bin\$(Configuration)\examples\$(MSBuildProjectName)\</OutputPath>

View File

@ -2,6 +2,8 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6</TargetFramework>
<LangVersion>10.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

View File

@ -1,6 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6</TargetFramework>
<LangVersion>10.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -1,6 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6</TargetFramework>
<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

View File

@ -4,7 +4,7 @@ An example of generating a strongly-typed actor client.
## Prerequisites
- [.NET 8+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/)

View File

@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

View File

@ -4,7 +4,7 @@ This Dapr workflow example shows how to create a Dapr workflow (`Workflow`) and
## Prerequisites
- [.NET 8+](https://dotnet.microsoft.com/download) installed
- [.NET 6+](https://dotnet.microsoft.com/download) installed
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
- [Initialized Dapr environment](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
- [Dapr .NET SDK](https://github.com/dapr/dotnet-sdk/)

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -6,6 +6,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>612,618</NoWarn>
</PropertyGroup>

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>

View File

@ -1,5 +1,5 @@
{
"_comment": "This policy allows the 9.0.100 SDK or patches in that family.",
"_comment": "This policy allows the 8.0.100 SDK or patches in that family.",
"sdk": {
"version": "9.0.100",
"rollForward": "latestFeature"

View File

@ -3,7 +3,7 @@
<Import Project="dapr_common.props" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<LangVersion>12.0</LangVersion>
<LangVersion>10.0</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>

View File

@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6;net8</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageId>Dapr.AI</PackageId>

View File

@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6;net7;net8;net9</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -50,7 +50,7 @@ namespace Dapr.Extensions.Configuration
DaprClient daprClient,
TimeSpan sidecarWaitTimeout,
bool isStreaming = false,
IReadOnlyDictionary<string, string>? metadata = null)
IReadOnlyDictionary<string, string>? metadata = default)
{
this.store = store;
this.keys = keys;
@ -89,7 +89,7 @@ namespace Dapr.Extensions.Configuration
var subscribeConfigurationResponse = await daprClient.SubscribeConfiguration(store, keys, metadata, cts.Token);
await foreach (var items in subscribeConfigurationResponse.Source.WithCancellation(cts.Token))
{
var data = new Dictionary<string, string?>(Data, StringComparer.OrdinalIgnoreCase);
var data = new Dictionary<string, string>(Data, StringComparer.OrdinalIgnoreCase);
foreach (var item in items)
{
id = subscribeConfigurationResponse.Id;

View File

@ -189,7 +189,7 @@ namespace Dapr.Extensions.Configuration.DaprSecretStore
private async Task LoadAsync()
{
var data = new Dictionary<string, string?>(StringComparer.InvariantCultureIgnoreCase);
var data = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase);
// Wait for the Dapr Sidecar to report healthy before attempting to fetch secrets.
using (var tokenSource = new CancellationTokenSource(sidecarWaitTimeout))

View File

@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6;net7;net8;net9</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Description>This package contains the reference protos used by develop services using Dapr.</Description>

View File

@ -1,16 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- NuGet configuration -->
<PropertyGroup>
<!-- NOTE: Workflows targeted .NET 7 (whereas other packages did not, so we must continue until .NET 7 EOL). -->
<TargetFrameworks>net6;net7;net8;net9</TargetFrameworks>
<Nullable>enable</Nullable>
<PackageId>Dapr.Workflow</PackageId>
<Title>Dapr Workflow Authoring SDK</Title>
<Description>Dapr Workflow SDK for building workflows as code with Dapr</Description>
<VersionPrefix>0.3.0</VersionPrefix>
<VersionSuffix>alpha</VersionSuffix>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Dapr.DurableTask.Client.Grpc" />
<PackageReference Include="Dapr.DurableTask.Worker.Grpc" />
<PackageReference Include="Microsoft.DurableTask.Client.Grpc" />
<PackageReference Include="Microsoft.DurableTask.Worker.Grpc" />
</ItemGroup>
<ItemGroup>

View File

@ -14,7 +14,7 @@
namespace Dapr.Workflow
{
using System;
using Dapr.DurableTask;
using Microsoft.DurableTask;
/// <summary>
/// Defines properties and methods for task activity context objects.

View File

@ -13,8 +13,9 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Dapr.DurableTask;
using Dapr.DurableTask.Client;
using Dapr.Client;
using Microsoft.DurableTask;
using Microsoft.DurableTask.Client;
namespace Dapr.Workflow
{

View File

@ -14,8 +14,8 @@
using System;
using System.Net.Http;
using Grpc.Net.Client;
using Dapr.DurableTask.Client;
using Dapr.DurableTask.Worker;
using Microsoft.DurableTask.Client;
using Microsoft.DurableTask.Worker;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

View File

@ -16,7 +16,7 @@ using Microsoft.Extensions.Logging;
namespace Dapr.Workflow
{
using System;
using Dapr.DurableTask;
using Microsoft.DurableTask;
using System.Threading.Tasks;
using System.Threading;

View File

@ -13,7 +13,7 @@
namespace Dapr.Workflow
{
using Dapr.DurableTask;
using Microsoft.DurableTask;
/// <summary>
/// Defines properties and methods for task activity context objects.

View File

@ -12,7 +12,7 @@
// ------------------------------------------------------------------------
using System;
using System.Threading;
using Dapr.DurableTask;
using Microsoft.DurableTask;
namespace Dapr.Workflow
{

View File

@ -18,7 +18,7 @@ namespace Dapr.Workflow
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Dapr.DurableTask;
using Microsoft.DurableTask;
using Microsoft.Extensions.DependencyInjection;
/// <summary>

View File

@ -15,7 +15,7 @@ namespace Dapr.Workflow
{
using System;
using Dapr.Client;
using Dapr.DurableTask.Client;
using Microsoft.DurableTask.Client;
/// <summary>
/// Represents a snapshot of a workflow instance's current state, including runtime status.

View File

@ -14,7 +14,7 @@
namespace Dapr.Workflow
{
using System;
using Dapr.DurableTask;
using Microsoft.DurableTask;
/// <summary>
/// Represents workflow task failure details.

View File

@ -11,7 +11,7 @@
// limitations under the License.
// ------------------------------------------------------------------------
using Dapr.DurableTask;
using Microsoft.DurableTask;
namespace Dapr.Workflow
{

View File

@ -3,7 +3,7 @@
<Import Project="$(MSBuildThisFileDirectory)..\properties\dapr_nuget.props" />
<PropertyGroup>
<TargetFrameworks>net8;net9</TargetFrameworks>
<TargetFrameworks>net6;net8;net9</TargetFrameworks>
<OutputPath>$(RepoRoot)bin\$(Configuration)\prod\$(MSBuildProjectName)\</OutputPath>
<DocumentationFile>$(OutputPath)$(MSBuildProjectName).xml</DocumentationFile>

View File

@ -19,8 +19,4 @@
<ProjectReference Include="..\Dapr.Actors.AspNetCore.IntegrationTest.App\Dapr.Actors.AspNetCore.IntegrationTest.App.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net9'">
<PackageReference Include="Microsoft.AspNetCore.TestHost" />
</ItemGroup>
</Project>

View File

@ -37,8 +37,4 @@
<ProjectReference Include="..\..\src\Dapr.Common\Dapr.Common.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net9'">
<PackageReference Include="Microsoft.AspNetCore.TestHost" />
</ItemGroup>
</Project>

View File

@ -334,15 +334,15 @@ namespace Dapr.Client.Test
envelope.States[0].Key.ShouldBe("testKey1");
envelope.States[0].Value.ShouldBe(ByteString.CopyFromUtf8(JsonSerializer.Serialize("testValue1")));
((IDictionary<string, string>)envelope.States[0].Metadata).ShouldContainKey("partitionKey1");
envelope.States[0].Metadata.ShouldContainKey("partitionKey1");
envelope.States[1].Key.ShouldBe("testKey2");
envelope.States[1].Value.ShouldBe(ByteString.CopyFromUtf8(JsonSerializer.Serialize("testValue2")));
((IDictionary<string, string>)envelope.States[1].Metadata).ShouldContainKey("partitionKey2");
envelope.States[1].Metadata.ShouldContainKey("partitionKey2");
envelope.States[2].Key.ShouldBe("testKey3");
envelope.States[2].Value.ShouldBe(ByteString.CopyFromUtf8(JsonSerializer.Serialize("testValue3")));
((IDictionary<string, string>)envelope.States[2].Metadata).ShouldContainKey("partitionKey3");
envelope.States[2].Metadata.ShouldContainKey("partitionKey3");
}
[Fact]
@ -1004,7 +1004,7 @@ namespace Dapr.Client.Test
envelope.StoreName.ShouldBe("testStore");
envelope.States.Count.ShouldBe(1);
envelope.States[0].Key.ShouldBe(key);
((IDictionary<string, string>)envelope.States[0].Metadata).ShouldContainKey("partitionKey");
envelope.States[0].Metadata.ShouldContainKey("partitionKey");
}
[Fact]

View File

@ -27,8 +27,4 @@
<ProjectReference Include="..\..\src\Dapr.Actors.Generators\Dapr.Actors.Generators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net9'">
<PackageReference Include="Microsoft.AspNetCore.TestHost" />
</ItemGroup>
</Project>

View File

@ -11,7 +11,5 @@
<PackageReference Include="Serilog.AspNetCore" />
<PackageReference Include="Serilog.Sinks.Console" />
<PackageReference Include="Serilog.Sinks.File" />
<PackageReference Include="System.Text.Encodings.Web" />
<PackageReference Include="System.Text.Json" />
</ItemGroup>
</Project>

View File

@ -2,7 +2,7 @@
<Import Project="$(MSBuildThisFileDirectory)..\properties\dapr_managed_netcore.props" />
<PropertyGroup>
<TargetFrameworks>net8;net9</TargetFrameworks>
<TargetFrameworks>net6;net7;net8;net9</TargetFrameworks>
<!-- Set Output Path for tests-->
<OutputPath>$(RepoRoot)bin\$(Configuration)\test\$(MSBuildProjectName)\</OutputPath>