Orleans analyzer diagnostics
Orleans analyzers detect unsupported RPC contracts, serialization schema problems, unsafe grain execution patterns, replay hazards in durable tasks, and compatibility changes. Select a diagnostic ID for its cause, impact, remediation, code-fix behavior, and suppression guidance.
Analyzer help links use https://aka.ms/orleans/diagnostics with the diagnostic ID as a URL fragment. The single redirect can therefore remain stable while this index and the detailed pages evolve.
ORLEANS0001
Section titled “ORLEANS0001”Place AlwaysInterleave on the grain interface — Error. [AlwaysInterleave] is applied to an implementation method.
ORLEANS0002
Section titled “ORLEANS0002”Reference parameter modifiers are not allowed — Error. A remote interface method uses ref, out, or in.
ORLEANS0003
Section titled “ORLEANS0003”Inherit from Grain — Removed. Current Orleans versions support POCO grain classes.
ORLEANS0004
Section titled “ORLEANS0004”Add missing serialization attributes — Error. A generated-serializer type has an unannotated member.
ORLEANS0005
Section titled “ORLEANS0005”Add GenerateSerializer — Info. A [Serializable] type does not opt into Orleans source-generated serialization.
ORLEANS0006
Section titled “ORLEANS0006”Static or abstract members cannot be serialized — Error. An invalid member is assigned an Orleans serialization ID.
ORLEANS0007
Section titled “ORLEANS0007”Use one Orleans activation constructor — Error. Constructor-selection metadata is ambiguous or invalid.
ORLEANS0008
Section titled “ORLEANS0008”Grain interfaces cannot contain properties — Error. An Orleans remote interface declares an instance property.
ORLEANS0009
Section titled “ORLEANS0009”Use a registered grain-call return type — Error. Orleans cannot map a remote method return type to an invokable request.
ORLEANS0010
Section titled “ORLEANS0010”Add a stable Alias — Info. A type or RPC method uses a name-derived identity.
ORLEANS0011
Section titled “ORLEANS0011”Rename a duplicated Alias — Error. Type or method aliases collide.
ORLEANS0012
Section titled “ORLEANS0012”Change a duplicated serialization Id — Error. Members of one serialized type reuse a field ID.
ORLEANS0013
Section titled “ORLEANS0013”Remove serialization identity attributes from a grain class — Error. A grain implementation is marked for data serialization.
ORLEANS0014
Section titled “ORLEANS0014”Preserve the grain execution context — Warning. ConfigureAwait can move a continuation outside the grain scheduler.
ORLEANS0016
Section titled “ORLEANS0016”Grain interface is not active in OrleansContracts.txt — Warning. A grain interface is missing or retired in the manifest.
ORLEANS0017
Section titled “ORLEANS0017”Grain interface version mismatch — Warning. Source and manifest versions differ.
ORLEANS0018
Section titled “ORLEANS0018”Grain interface member not declared — Warning. An RPC signature is absent from the manifest.
ORLEANS0019
Section titled “ORLEANS0019”Removed grain interface is not retired — Warning. An active manifest interface no longer exists in source.
ORLEANS0020
Section titled “ORLEANS0020”OrleansContracts.txt is missing — Info. Contract analysis is enabled without a manifest.
ORLEANS0021
Section titled “ORLEANS0021”Duplicate grain interface declaration — Warning. The manifest repeats an interface name or identity.
ORLEANS0022
Section titled “ORLEANS0022”Grain class is not active in OrleansContracts.txt — Warning. A grain class is missing or retired in the manifest.
ORLEANS0023
Section titled “ORLEANS0023”Grain class identity mismatch — Warning. Source and manifest grain types differ.
ORLEANS0024
Section titled “ORLEANS0024”Removed grain class is not retired — Warning. An active manifest grain class no longer exists in source.
ORLEANS0025
Section titled “ORLEANS0025”Duplicate grain class declaration — Warning. The manifest repeats a grain class name or identity.
ORLEANS0026
Section titled “ORLEANS0026”Invalid invokable base type mapping — Error. A custom grain-call return type mapping cannot generate a valid invokable request.
ORLEANS0027
Section titled “ORLEANS0027”Grain interface member removed from source — Warning. The manifest retains an RPC signature which is absent from source.
ORLEANS0028
Section titled “ORLEANS0028”Invalid Orleans identity — Error. An alias, grain type, or grain interface type violates the identity syntax.
ORLEANS0200
Section titled “ORLEANS0200”Access grain state in recorded effects or after the last durable operation — Warning. Durable task code reads or changes grain state where a replay runs it again.
ORLEANS0201
Section titled “ORLEANS0201”Produce non-deterministic values in recorded effects — Warning. Durable task code produces a clock, random, or environment value where a replay runs it again.
ORLEANS0202
Section titled “ORLEANS0202”Await external operations in steps or after the last durable operation — Warning. Durable task code awaits a service or other external work where a replay runs it again.
ORLEANS0203
Section titled “ORLEANS0203”Change grain state after the last external await — Warning. A step or a body’s tail changes grain state before an external await, so the change can commit without the result.
ORLEANS0204
Section titled “ORLEANS0204”Return the outputs of a DurableTask.RunInline effect — Warning. A DurableTask.RunInline effect assigns a variable of the body, which a replay doesn’t assign.
ORLEANS0205
Section titled “ORLEANS0205”Await, schedule, or post durable task definitions — Error. Durable task code creates a durable task definition and never runs it.
ORLEANS0206
Section titled “ORLEANS0206”Run each durable task definition once — Warning. Durable task code runs a single-use durable task definition more than once.
ORLEANS0207
Section titled “ORLEANS0207”Use durable operation names without ’$’ — Error. A WithId or DurableTask.RunInline name contains $, which the runtime rejects.
ORLEANS0208
Section titled “ORLEANS0208”Give each durable operation call site its own name — Warning. Two call sites in one body name their durable operations alike, so their identifiers depend on order.
ORLEANS0209
Section titled “ORLEANS0209”Keep durable task bodies on their scheduler — Warning. Durable task code starts threads, timers, or thread-pool work off the activation’s scheduler.
ORLEANS0210
Section titled “ORLEANS0210”Run concurrent durable work through durable combinators — Warning. Durable task code combines durable work with a Task combinator instead of a durable combinator.
ORLEANS0211
Section titled “ORLEANS0211”Wait with durable delays — Warning. Durable task code waits with Task.Delay or Thread.Sleep, which a replay restarts.
ORLEANS0212
Section titled “ORLEANS0212”Filter cancellation handlers by IsTaskCancellationRequested — Warning. Durable task code catches cancellation without telling task cancellation from attempt cancellation.
ORLEANS0213
Section titled “ORLEANS0213”Return a task from asynchronous code in durable task bodies — Warning. A durable task body contains async void code, which the body can’t observe.
ORLEANS0214
Section titled “ORLEANS0214”Derive a signal name for each repeated wait — Info. Durable task code waits for one signal name in a loop, so every wait returns the first value.
ORLEANS0215
Section titled “ORLEANS0215”Log through a replay-safe logger — Info. Durable task code logs through a logger which logs again on replay.
ORLEANS0216
Section titled “ORLEANS0216”Post durable tasks from grains or durable task bodies — Warning. Code outside grains and durable task bodies posts a durable task, which throws.
ORLEANS0217
Section titled “ORLEANS0217”Pass AttemptCancellationToken to calls in task-cancellation cleanup — Warning. Cleanup after task cancellation passes CancellationToken, which task cancellation has already canceled, so its calls end at once.
ORLEANS0218
Section titled “ORLEANS0218”Pass constant version names and ranges — Warning. A version check computes its change name or supported range at run time.
ORLEANS0219
Section titled “ORLEANS0219”Await, combine, or return the handles of scheduled children — Info. A durable task body schedules an attached child and never observes its handle.
ORLEANS0220
Section titled “ORLEANS0220”Name durable operations whose position can change — Info. An unnamed durable operation runs in a loop, a condition, or after another unnamed operation, so its generated identifier can shift.
ORLEANS0221
Section titled “ORLEANS0221”Run synchronous work with DurableTask.RunInline — Info. A DurableTask.Run step runs only synchronous work, which an effect records without a child execution.
ORLEANS0222
Section titled “ORLEANS0222”Pass delegates which return a task for asynchronous work — Error. DurableTask.Run or DurableTask.RunInline receives an async void delegate, whose completion is recorded before its work completes.
ORLEANS0223
Section titled “ORLEANS0223”Assign new values to grain state instead of changing them in place — Warning. Durable task code changes an object which grain state holds, and the journal records no change.
ORLEANS0225
Section titled “ORLEANS0225”Await durable tasks instead of polling them in durable task bodies — Error. A durable task body polls a scheduled task, which throws NotSupportedException.
ORLEANS0226
Section titled “ORLEANS0226”Continue durable task bodies on their scheduler — Error. A durable task body awaits with ConfigureAwait(false), which resumes it off its grain’s scheduler.
ORLEANS0227
Section titled “ORLEANS0227”Run durable operations outside DurableTask.RunInline effects — Error. A DurableTask.RunInline effect starts a task or checks a version, which throws InvalidOperationException.
ORLEANS0228
Section titled “ORLEANS0228”Detach durable grain calls — Error. Durable task code detaches a step, an async DurableTask method, or a combinator, which runs only as part of the execution which starts it.
