TemporalCommunity.DurableObjects 0.6.0

Prefix Reserved
dotnet add package TemporalCommunity.DurableObjects --version 0.6.0
                    
NuGet\Install-Package TemporalCommunity.DurableObjects -Version 0.6.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TemporalCommunity.DurableObjects" Version="0.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TemporalCommunity.DurableObjects" Version="0.6.0" />
                    
Directory.Packages.props
<PackageReference Include="TemporalCommunity.DurableObjects" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TemporalCommunity.DurableObjects --version 0.6.0
                    
#r "nuget: TemporalCommunity.DurableObjects, 0.6.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TemporalCommunity.DurableObjects@0.6.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TemporalCommunity.DurableObjects&version=0.6.0
                    
Install as a Cake Addin
#tool nuget:?package=TemporalCommunity.DurableObjects&version=0.6.0
                    
Install as a Cake Tool

TemporalCommunity.Extensions

Community-built extensions and compile-time guardrails for the Temporal .NET SDK.

Which offering fits?

If you want to... Start here
Create a plain Temporal .NET worker or a Worker + Client + Shared solution Generate and run a template solution
Add replay-safety checks to ordinary Temporal workflows Inspect the general analyzer examples
Model a long-lived entity with a stable ID and serialized updates Run the Durable Objects page-counter demo

Packages

Package Purpose
TemporalCommunity.Templates dotnet new templates for Temporal workflows, activities, workers, and Worker + Client + Shared solutions, with optional Aspire and OpenTelemetry.
TemporalCommunity.Extensions.Analyzers Replay-safety analyzers and code fixes for ordinary Temporal .NET workflows.
TemporalCommunity.DurableObjects An opinionated durable-actor model for long-lived entities addressed by stable ID.
TemporalCommunity.DurableObjects.Analyzers Durable Objects contract analyzers, code fixes, and generated asynchronous clients.

Temporal workflow analyzers

Add compile-time checks to any Temporal .NET workflow project:

dotnet add package TemporalCommunity.Extensions.Analyzers

The package detects replay-safety and workflow-shape misuse in ordinary Temporal workflows, with IDE code fixes where a deterministic replacement is safe. These diagnostics also work in projects that do not reference the Durable Objects runtime.

See Temporal .NET Analyzers for installation details, the full rule catalog, code-fix behavior, limitations, and Durable Objects generator requirements.

Durable Objects

TemporalCommunity.DurableObjects is for entity-style workflows such as accounts, devices, sessions, etc. It adds start-on-first-update through Update-with-Start, fire-and-forget signals through Signal-with-Start, shared update/signal serialization, contained handler failures, and typed state across Continue-as-New. Signal completion acknowledges server recording, not handler completion; use updates when the caller needs acceptance, a result, or an error.

Use a plain Temporal workflow when the execution represents a process with a defined end or needs child workflows, orchestration-heavy control flow, or unrestricted SDK behavior. See Durable Objects concepts for the detailed comparison and lifecycle model.

Install

dotnet add package TemporalCommunity.DurableObjects
dotnet add package TemporalCommunity.Extensions.Analyzers
dotnet add package TemporalCommunity.DurableObjects.Analyzers

Requires Temporal Server v1.30.0 or later. The runtime targets .NET 10, .NET 8, and .NET Standard 2.1. .NET Standard does not support visibility-listing APIs.

Minimal example

This is a conceptual sketch of the Durable Objects programming model, not a complete runnable application. For the full worker and caller setup, run sample 01.

Define a contract and implementation:

using Temporalio.Workflows;
using TemporalCommunity.DurableObjects;

[Workflow]
public interface ICounter : IDurableObject
{
    [WorkflowUpdate] Task<int> IncrementAsync(int amount);
    [WorkflowQuery] int GetCount();
}

[Workflow]
public sealed class Counter : DurableObjectBase<int>, ICounter
{
    [WorkflowInit]
    public Counter(DurableObjectSnapshot<int>? snapshot = null) : base(snapshot, 0) { }

    [WorkflowRun]
    public Task RunAsync(DurableObjectSnapshot<int>? snapshot = null) => DurableObjectRunAsync();

    [WorkflowUpdate]
    public Task<int> IncrementAsync(int amount)
    {
        State += amount;
        return Task.FromResult(State);
    }

    [WorkflowQuery]
    public int GetCount() => State;
}

This example calls Durable Objects and runs the worker in the same process, so it registers both sides.

  • AddDurableObjects provides the client-side IDurableObjectFactory and its default task queue.
  • AddDurableObjectWorkflows registers the object workflows and Durable Objects runtime on the worker.

If callers and workers run in separate services, each service registers only the side it uses; their task-queue names must match.

services.AddTemporalClient(options => options.TargetHost = "localhost:7233");
// Caller side: register the factory used to get Durable Object clients.
services.AddDurableObjects("my-task-queue");

// Worker side: register object workflows and their runtime behavior.
services.AddHostedTemporalWorker("my-task-queue")
    .AddDurableObjectWorkflows(typeof(Counter).Assembly);

Use the concrete client generated by TemporalCommunity.DurableObjects.Analyzers:

var counter = factory.GetCounterClient("counter-42");
await counter.IncrementAsync(5);
var current = await counter.GetCountAsync();

IncrementAsync(5) is a workflow update. If counter-42 is not running, Update-with-Start starts the object and submits the increment in one operation. Its state is rebuilt from Temporal history after worker restarts and carried through Continue-as-New by DurableObjectBase<TState>.

Start with the runnable getting-started sample and the Durable Objects starting path for validators, activities, lifecycle behavior, failure handling, and production guidance.

Samples

Six runnable Durable Objects samples cover generated clients, validation, scheduling and reminders, object-to-object calls through activities, observability, and testing. See the samples index or the repository-wide getting-started paths.

For the Durable Objects demos, start a local Temporal server and run sample 01:

temporal server start-dev
just run-sample

Documentation

Start with Getting started to choose a path for templates, analyzers, or Durable Objects.

Templates and analyzers

  • Temporal .NET templates: Generate workflows, activities, converters, workers, or solutions with dotnet new.
  • Temporal .NET analyzers: Install replay-safety and Durable Objects checks, explore code fixes, and use generated Durable Objects clients.

Durable Objects

  • Concepts and API: Decide when to use Durable Objects and learn their identity, state, updates, scheduling, and API.
  • Lifecycle and deactivation: Understand when an object stays resident, when it closes, and how history is compacted. This guide calls those choices "tiers."
  • Failure handling: Handle client and lifecycle failures, authorization, and reminder retries.
  • Troubleshooting: Diagnose common worker, query, scheduling, and configuration problems.

Building from source

Prerequisites: .NET 10 SDK and just.

dotnet tool restore
just build
just test

Run just to list all recipes. Samples 01–05 use an external Temporal server (by default at localhost:7233); sample 06 starts an SDK-managed local server; analyzer samples 07–08 need no server. Full package verification (just pack-verify) and the local CI-equivalent (just ci) use Unix/Bash tooling and are supported on Linux and macOS. On Windows, after dotnet tool restore, run just test-unit from PowerShell 7 (pwsh); that recipe uses PowerShell-safe single-line dotnet test commands. GitHub Actions repeats the build and tests on Windows and runs package verification on Ubuntu.

Contributing

  1. Fork and clone the repository.
  2. Run dotnet tool restore once.
  3. Before opening a pull request, run just ci on Linux/macOS or just test-unit on Windows.
  4. Add or update meaningful tests and user documentation when behavior changes.
  5. Document current behavior and compatibility constraints in the relevant guide under docs/.

License

MIT — see LICENSE.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.6.0 35 10/13/2026
0.5.0 94 10/2/2026
0.3.4 159 7/15/2026
0.3.2 122 7/14/2026
0.2.0 133 7/13/2026
0.1.1-preview.13 68 7/8/2026