TemporalCommunity.DurableObjects
0.3.4
Prefix Reserved
dotnet add package TemporalCommunity.DurableObjects --version 0.3.4
NuGet\Install-Package TemporalCommunity.DurableObjects -Version 0.3.4
<PackageReference Include="TemporalCommunity.DurableObjects" Version="0.3.4" />
<PackageVersion Include="TemporalCommunity.DurableObjects" Version="0.3.4" />
<PackageReference Include="TemporalCommunity.DurableObjects" />
paket add TemporalCommunity.DurableObjects --version 0.3.4
#r "nuget: TemporalCommunity.DurableObjects, 0.3.4"
#:package TemporalCommunity.DurableObjects@0.3.4
#addin nuget:?package=TemporalCommunity.DurableObjects&version=0.3.4
#tool nuget:?package=TemporalCommunity.DurableObjects&version=0.3.4
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 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, 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
- Fork and clone the repository.
- Run
dotnet tool restoreonce. - Run
just cibefore opening a pull request. - Add or update meaningful tests and user documentation when behavior changes.
- Record architectural decisions and compatibility constraints in
adr/.
License
MIT — see LICENSE.
| Product | Versions 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. |
-
.NETStandard 2.1
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- System.Collections.Immutable (>= 10.0.1)
- Temporalio (>= 1.16.0)
- Temporalio.Extensions.Hosting (>= 1.16.0)
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Temporalio (>= 1.16.0)
- Temporalio.Extensions.Hosting (>= 1.16.0)
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Temporalio (>= 1.16.0)
- Temporalio.Extensions.Hosting (>= 1.16.0)
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 | 111 | 7/13/2026 |
| 0.1.1-preview.13 | 52 | 7/8/2026 |