TemporalCommunity.DurableObjects 0.3.2

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package TemporalCommunity.DurableObjects --version 0.3.2
                    
NuGet\Install-Package TemporalCommunity.DurableObjects -Version 0.3.2
                    
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.3.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TemporalCommunity.DurableObjects" Version="0.3.2" />
                    
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.3.2
                    
#r "nuget: TemporalCommunity.DurableObjects, 0.3.2"
                    
#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.3.2
                    
#: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.3.2
                    
Install as a Cake Addin
#tool nuget:?package=TemporalCommunity.DurableObjects&version=0.3.2
                    
Install as a Cake Tool

TemporalCommunity.Extensions

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

This repository contains a durable-actor programming model, general Temporal workflow analyzers, Durable Objects analyzers and source generators, and their IDE code fixes. Each package is opt-in; using the analyzers does not require adopting Durable Objects.

Packages

Package Purpose
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.

The analyzer packages contain both the compiler-safe analyzer and the IDE code-fix assembly. There are no separate code-fix packages to install.

Temporal workflow analyzers

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

dotnet add package TemporalCommunity.Extensions.Analyzers

The package currently detects workflow use of ConfigureAwait(false), Task.Delay, and system clock reads, with code fixes for each rule. 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, carts, devices, sessions, and counters. It adds atomic activation, serialized updates, contained update failures, typed state across Continue-as-New, managed lifecycle behavior, visibility metadata, reminders, and generated clients.

Use a plain Temporal workflow when the execution represents a process with a defined end or needs signals, 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.28.0 or later for Update-with-Start. The runtime targets .NET 10, .NET 8, and .NET Standard 2.1. .NET Standard does not support visibility-listing APIs.

Minimal example

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;
}

Register the client factory and worker types:

services.AddTemporalClient(options => options.TargetHost = "localhost:7233");
services.AddDurableObjects("my-task-queue");
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();

The first update starts the object atomically. 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 guide 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.

temporal server start-dev
just run-sample

Documentation

Guide Contents
Temporal .NET analyzers General and Durable Objects rules, code fixes, generated clients, and installation.
Durable Objects concepts When to use the runtime, identity, lifecycle, state, scheduling, NativeAOT, and API overview.
Durable Objects getting started Reading path from first object through production readiness.
Required Durable Objects patterns Workflow entry point, registration, activities, and scheduled-object requirements.
Failure handling Exception taxonomy, authorization, lifecycle failures, and reminder idempotency.
Tier model Resident execution, explicit deactivation, and Continue-as-New behavior.
Troubleshooting Common runtime, configuration, and NativeAOT problems.
Maintainer verification Replay, packaging, NativeAOT, benchmark, scale, and release checks.
Architecture decisions Lasting design decisions and compatibility constraints.

Maintainer-facing implementation plans live in plans/, separate from user documentation.

Building from source

Prerequisites: .NET 10 SDK and just.

dotnet tool restore
just build
just test
just pack-verify

Run just to list all recipes. Integration tests use an embedded Temporal test server; samples require a server at localhost:7233.

Contributing

  1. Fork and clone the repository.
  2. Run dotnet tool restore once.
  3. Run just ci before opening a pull request.
  4. Add or update meaningful tests and user documentation when behavior changes.
  5. Record architectural decisions and compatibility constraints in adr/.

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.3.4 110 7/15/2026
0.3.2 96 7/14/2026
0.2.0 112 7/13/2026
0.1.1-preview.13 52 7/8/2026