TemporalCommunity.Extensions.Analyzers 0.2.0

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

Temporal .NET Analyzers

Two opt-in analyzer packages provide compile-time guidance and IDE code fixes:

  • TemporalCommunity.Extensions.Analyzers applies to vanilla Temporal .NET workflows.
  • TemporalCommunity.DurableObjects.Analyzers adds DurableObjects contract checks.

Install the package appropriate for the project that declares workflows:

<PackageReference Include="TemporalCommunity.Extensions.Analyzers" Version="...">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

DurableObjects projects may reference both packages. The general package does not depend on the DurableObjects runtime.

General Temporal rules

ID Meaning Code fix
TEMP001 ConfigureAwait(false) leaves Temporal's workflow task scheduler. Remove ConfigureAwait(false).
TEMP002 Task.Delay uses a system timer and is not replay-safe. Replace it with Workflow.DelayAsync.
TEMP003 DateTime or DateTimeOffset system-clock reads are not replay-safe. Replace it with Workflow.UtcNow.

These diagnostics apply to code lexically contained in a type with [Workflow]. They do not claim to inspect arbitrary external helper libraries; workflow replay tests remain necessary.

DurableObjects rules

ID Meaning Code fix
DO0001 A contract method is not a Task-returning update or synchronous query. Add the appropriate update or query attribute.
DO0002 A DurableObject declares a signal, which the programming model does not support. Replace the signal attribute with an update attribute.
DO0003 A concrete DurableObject is missing its declared [WorkflowRun] method. None; the correct run signature depends on state shape.
DO0004 A typed-state object does not declare matching optional snapshot initializer and run signatures. None; initializer construction requires an application state decision.
DO0005 A contract uses a shape that cannot produce a generated client. None; make the contract public and non-generic, and avoid generic/ref/dynamic handlers or generated-name collisions.

Generated DurableObject clients

TemporalCommunity.DurableObjects.Analyzers also generates one concrete client per supported contract. A contract such as ICounter produces CounterDurableObjectClient and a GetCounterClient factory extension. Synchronous contract queries remain available for source compatibility, while the concrete client adds asynchronous query methods and call-options overloads. A module initializer registers the concrete implementation so ordinary Get<ICounter> calls avoid DispatchProxy too.

Generation currently requires a public, top-level, non-generic contract. Existing applications that do not install the analyzer package continue to use the runtime proxy fallback.

Each NuGet package contains a compiler-safe analyzer assembly and a separate Workspace-dependent code-fix assembly. Consumers still install only the one package shown above.

Suppress a rule only after establishing that the reported code cannot execute in workflow context. Project-wide suppression of determinism rules is not recommended.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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 115 7/15/2026
0.3.2 173 7/14/2026
0.2.0 105 7/13/2026