Releases: dapr/dotnet-sdk
Release list
v1.18.5
What's Changed
- Promoting Dapr.Actors.Next to 1.18 patch release by @WhitWaldo in #1865
- Added support for actor retry failure policies by @WhitWaldo in #1872
- Fixing workflow tracing + adding observability integration testing by @WhitWaldo in #1870
- Can now pass environment variables into daprd container during integration tests by @WhitWaldo in #1871
- No longer swallows exceptions for anything except NotFound error when retrieving workflow state from runtime by @WhitWaldo in #1877
- Propagate trace context for gRPC calls by @mtaghavi2005 in #1858
Miscellaneous infrastructure changes:
- Restoring 1.17 to CI testing by @WhitWaldo in #1856
- Auto open issue on ci failure during release by @cicoyle in #1864
New Contributors
Full Changelog: v1.18.4...v1.18.5
v1.19.0-preview.2 - Dapr.Actors.Next: A ground-up rewrite of Dapr Actors for .NET
Dapr.Actors.Next is a ground-up re-implementation of the Dapr Actors building block for .NET, shipping as a preview throughout the 1.18 release cycle, with a stable release planned alongside Dapr runtime v1.19. The actor model itself is unchanged: actors remain virtual, addressed by type and ID, and support reentrancy, timers, reminders, proxying, etc. However, the way the SDK connects to the runtime and the way you write actor code have been modernized.
Highlights
- Streaming runtime connectivity
Actor callbacks (invoke, reminder, timer, deactivate) now arrive over a long-lived bidirectional gRPC stream instead of inbound, per-call HTTP requests into mapped actor-handler endpoints. This is the same pattern already used for Dapr workflows and streaming pub/sub subscriptions. There are no actor handlers to map, though your app will still need to expose a port for inbound gRPC connections from the Dapr runtime. - No reflection, trim-clean and AOT-ready
Source generators produce the proxy, dispatcher, activation factory, registration and actor registry from your interface and implementation. Actors are discovered rather than registered by hand, and the runtime packages can be used in applications building for Native AOT. - Compile-time safety
The public surface is annotated for nullable reference types, and new analyzers and code fixes catch actor-specific mistakes as you type: non-serializable or non-task-returning methods, blocking calls inside a turn, state changes that would break deserialization, using a callback method in a reminder that doesn't exist in the specified type, reading time from the clock instead of an injectedTimeProvider, and more! - Consistent with the rest of the modern Dapr .NET SDK packages
This release features per-activation DI scopes, use of the options pattern (IOptions<DaprActorsOptions>), and the same pluggableIDaprSerializer(System.Text.Json by default) used byDapr.StateManagementandDapr.Workflow. - New capabilities
State-envelope schema versioning with upcaster chains, a first-classStateMachineActor<TState, TData>model, pub/sub-driven actors via[Subscribe]applied to the method to call instead of requiring external startup subscription and invocation, dynamic invocation by type/id/method with no compile-time contract, and an in-memory deterministic test runtime with optional Coyote integration.
Performance
Replacing the reflection-based proxy and dispatch machinery with source generators shows up directly in the numbers. In our benchmarks, creating an actor proxy drops from roughly 725 ns and 3.4 KB allocated under Dapr.Actors to about 14 ns and 48 B under Dapr.Actors.Next: a ~50x improvement in time and ~70x in allocation. A warm actor call is about 20% faster (≈484 ns -> ≈375 ns) and allocates roughly 30% less (1,264 B -> 912 B). The largest end-to-end win is in startup: building the provider, resolving the actor runtime, and dispatching the first call takes ~284 µs under Dapr.Actors versus ~37 µs under Dapr.Actors.Next, an ~8x reduction that holds steady as the number of registered actor types grows because registration and dispatch are generated at compile time rather than discovered and emitted on first use. Container construction itself is marginally more expensive on the new SDK (~6.0 µs vs ~4.7 µs) as more is wired up front, but that cost is repaid many times over on the first invocation.
We expect further optimizations before the 1.19 GA.
Benchmarks run with BenchmarkDotNet; figures are means from a single machine and are indicative rather than a guarantee. Feel free to run them yourself from here.
Compatibility notes
- This package requires the Dapr runtime v1.18 or later.
- This package is not API compatible with the original
Dapr.Actors. Because actors are addressed by the same type names, you can migrate one actor type at a time, but it's easier to do that across separate projects than to mix both SDKs in one. - Serialization is a clean break: there's a single serialization path and no built-in DataContract support (supply and register your own implementation of
IDaprSerializerif you need it). Verify that existing persisted state still deserializes before migrating a type. Dapr.Actorsand its associated packages are now in maintenance mode and will receive security and bug fixes only. No deprecation date has been set.
Getting started
Add the package to your project:
dotnet add package Dapr.Actors.Next --prereleaseThen register it in DI with builder.Services.AddDaprActors().
Documentation is available along with a six-part tutorial spanning different implementation examples.
Please reach out in the .NET channel on Discord or file an issue if you encounter problems, have feature suggestions, or just want to share feedback about this new functionality!
v1.18.4
What's Changed
- Fix build warnings about analyzer version in Dapr.Workflow by @WhitWaldo in #1851
- FIx for Dapr.Common not being transiently referenced by project by @WhitWaldo in #1852
- Downgrading analyzer assembly version to fix workflow registration issues by @WhitWaldo in #1854
- Updating the runtime version numbers selection script by @WhitWaldo in #1855
Full Changelog: v1.18.2...v1.18.4
v1.18.2
What's Changed
- Fixing workflow versioning out-of-order registration bug by @WhitWaldo in #1850
- GetWorkflowStateAsync should always return
WorkflowStateby @WhitWaldo in #1847
Full Changelog: v1.18.1...v1.18.2
v1.18.1
What's Changed
- Removed 1.17 from CI testing temporarily by @WhitWaldo in #1848
Full Changelog: v1.18.0...v1.18.1
What's Changed
General
- ADDED
Dapr.SecretsManagementpackage #1794 to split secret management into its own client - ADDED
Dapr.StateManagementpackage #1806 to split state management into its own client - ADDED Rich backwards-compatibility support added to the SDK to better support runtime API maturation lifecycles #1816
- ADDED Serializer refactored from
Dapr.WorkflowtoDapr.Common#1805 as a precursor to having common serialization across .NET SDK - ADDED Add optional parameter to configuration providers for non-blocking startup #1844
- UPDATED Making DaprDefaults public #1845
- FIXED Prevent race condition during GrpcProtocolHandler disposal #1798
Actors
- ADDED
UnloadStateAsyncimplementation #1750 to force actors to unload their currently cached in-memory state (no impact to persisted state). The next timeGetStateAsyncis called, the cache is repopulated as normal.
PubSub
- FIXED Subscriber resilience:
SubscribeAsyncnow throwsDaprExceptionwhen the sidecar is unavailable instead of failing silently #1803
Metadata
- ADDED Added new
Dapr.Metadatapackage for retrieving strongly typed data from the Dapr Metadata API #1846.
To use, addDapr.Metadatapackage from NuGet, register in DI withbuilder.Services.AddDaprMetadata()and simply injectIOptions<DaprMetadata>,IOptionsSnapshot<DaprMetadata>orIOptionsMonitor<DaprMetadata>and read the values out of the injected value.
Service Invocation
- UPDATED
InvokeMethodAsyncfamily marked[Obsolete]aligning SDK with prior runtime guidance — recommended guidance is to use a native HTTP/gRPC client for service invocation #1698.
Jobs
- UPDATED Jobs API marked stable #1804.
- UPDATED Minimum-version tags adjusted to reflect broader test coverage (#1811).
Workflows
- ADDED Workflow history context propagation (#1802)
- UPDATED Combined
Dapr.Workflowmeta-project (#1822) and automatic workflow/activity registration (#1823)
This means that there is no longer a need to installDapr.Workflow.VersioningorDapr.Workflow.Analyzersseparately. All are bundled in the oneDapr.Workflowpackage, no refactoring necessary (though you might want to remove the stale packages). - UPDATED No longer logging connection closed exception when app closes #1841
- UPDATED Use server-blocking WaitForInstnace* RPCs instead of client polling #1843
- ADDED Timer origins and backwards-compatible optional timers (#1790)
- ADDED Add workflow analyzer diagnostics on versioning (#1815
- ADDED Expose name on workflow state #1836
- ADDED Support history propagation API #1825, #1833
- ADDED Expose workflow name on state #1836
- FIXED Workflow patch ordering #1807, #1809
- FIXED Trace propagation fix for downstream calls from workflow user activities #1808
- FIXED Addressing "no such instance exists" errors #1818, #1812
- FIXED Fix workflow trace correlation #1829
- FIXED add missing FailureDetails property to proto converter #1831
Miscellaneous/Testing
- ADDED Integration test project for
Actors.Generators#1791. - ADDED Adding gRPC probe with HTTP/2 preface to eliminate some transient
Unavailableerrors during integration testing via Testcontainers #1821 - UPDATED Stabilization of flaky integration tests #1813.
- UPDATED CI script more accurately auto-detects valid Dapr runtime versions to support automatic N-2 validation #1810
- REMOVED Removing deprecated analyzers/codefixes #1834
New Contributors
- @olitomlinson made their first contribution in #1750
- @Eckii24 made their first contribution in #1831
- @nelson-parente made their first contribution in #1825
Full Changelog: v1.17.9...v1.18.1
v1.18.0-rc.7
What's Changed
- Fix workflow trace correlation by @mtaghavi2005 in #1829
- fix(workflow): add missing FailureDetails property to proto converter by @Eckii24 in #1831
- feat(workflow): align history propagation API with go-sdk by @nelson-parente in #1825
- Propagated history changes by @WhitWaldo in #1833
- Removing deprecated analyzers/codefixes by @WhitWaldo in #1834
- Expose workflow name on state by @WhitWaldo in #1836
- No longer logging connection closed exception when app closes by @WhitWaldo in #1841
- Use server-blocking WaitForInstnace* RPCs instead of client polling by @WhitWaldo in #1843
- Add optional parameter to configuration providers for non-blocking startup by @WhitWaldo in #1844
- Added Dapr Metadata package with tests by @WhitWaldo in #1846
- Making DaprDefaults public by @WhitWaldo in #1845
New Contributors
- @Eckii24 made their first contribution in #1831
- @nelson-parente made their first contribution in #1825
Full Changelog: v1.18.0-rc.4...v1.18.0-rc.7
v1.18.0-rc.4
What's Changed
- Bundle Dapr.SecretsManagement.* and Dapr.StateManagement.* into single NuGet packages by @Copilot in #1827
Full Changelog: v1.18.0-rc.3...v1.18.0-rc.4
v1.18.0-rc.3
What's Changed
- Make Dapr.Workflow a single NuGet meta-package by @Copilot in #1824
Full Changelog: v1.18.0-rc02...v1.18.0-rc.3
v1.18.0-rc02
What's Changed
- feat: Implement Dapr.StateManagement package by @Copilot in #1806
- Combine all Dapr.Workflow functionality into single meta project by @WhitWaldo in #1822
- Automatic registration of workflows and activities by @WhitWaldo in #1823
Full Changelog: v1.18.0-rc01...v1.18.0-rc02
v1.18.0-rc01
What's Changed
New Features
- Implement timer origins and backwards-compatible optional timers by @Copilot in #1790
- Porting serialization from Dapr.Workflow as common approach used in all SDKs by @WhitWaldo in #1805
- Promoting Jobs to stable APIs by @WhitWaldo in #1804
- Implementation of UnloadStateAsync by @olitomlinson in #1750
- Feature: Workflow history propagation by @WhitWaldo in #1802
- feat: Implement Dapr.SecretsManagement package by @Copilot in #1794
Bug Fixes
- bugfiix: Prevent race condition during GrpcProtocolHandler disposal by @WhitWaldo in #1798
- bugfix: SubscribeAsync throws DaprException when sidecar is unavailable by @Copilot in #1803
- bugfix: Addressing OpenTelemetry propagation bug by @WhitWaldo in #1808
- bugfix(workflows): Addressing "no such instance exists" errors by @WhitWaldo in #1812
- bugfix: Workflow analyzer was pointing to incorrect diagnostic ID by @WhitWaldo in #1815
- bugfix: Workflow overhaul, new feature bugfix by @WhitWaldo in #1818
- bugfix: API token unused with DeleteBulkStateAsync by @WhitWaldo in #1820
- bugfix: Correctly apply patch inserted before current replay target by @WhitWaldo in #1809
- bugfix: Dapr.Testcontainers: probe gRPC port with HTTP/2 preface to eliminate transient
Unavailableon first RPC by @Copilot in #1821
Miscellaneous/Infrastructure
- Modifying script tag retrieval script for build infra by @WhitWaldo in #1810
- Adding minimum version tags to Jobs to reflect broader test coverage by @WhitWaldo in #1811
- chore: Address flaky integration tests by @WhitWaldo in #1813
- Bump OpenTelemetry.Exporter.OpenTelemetryProtocol from 1.15.0 to 1.15.3 by @dependabot[bot] in #1800
- Adding rich backwards compatibility support to SDK by @WhitWaldo in #1816
New Contributors
- @olitomlinson made their first contribution in #1750
Full Changelog: v1.17.9...v1.18.0-rc01