Skip to content

Orleans analyzer diagnostics

Orleans analyzers detect unsupported RPC contracts, serialization schema problems, unsafe grain execution patterns, 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.

Place AlwaysInterleave on the grain interface — Error. [AlwaysInterleave] is applied to an implementation method.

Reference parameter modifiers are not allowed — Error. A remote interface method uses ref, out, or in.

Inherit from Grain — Removed. Current Orleans versions support POCO grain classes.

Add missing serialization attributes — Error. A generated-serializer type has an unannotated member.

Add GenerateSerializer — Info. A [Serializable] type does not opt into Orleans source-generated serialization.

Static or abstract members cannot be serialized — Error. An invalid member is assigned an Orleans serialization ID.

Use one Orleans activation constructor — Error. Constructor-selection metadata is ambiguous or invalid.

Grain interfaces cannot contain properties — Error. An Orleans remote interface declares an instance property.

Use a registered grain-call return type — Error. Orleans cannot map a remote method return type to an invokable request.

Add a stable Alias — Info. A type or RPC method uses a name-derived identity.

Rename a duplicated Alias — Error. Type or method aliases collide.

Change a duplicated serialization Id — Error. Members of one serialized type reuse a field ID.

Remove serialization identity attributes from a grain class — Error. A grain implementation is marked for data serialization.

Preserve the grain execution context — Warning. ConfigureAwait can move a continuation outside the grain scheduler.

Grain interface is not active in OrleansContracts.txt — Warning. A grain interface is missing or retired in the manifest.

Grain interface version mismatch — Warning. Source and manifest versions differ.

Grain interface member not declared — Warning. An RPC signature is absent from the manifest.

Removed grain interface is not retired — Warning. An active manifest interface no longer exists in source.

OrleansContracts.txt is missing — Info. Contract analysis is enabled without a manifest.

Duplicate grain interface declaration — Warning. The manifest repeats an interface name or identity.

Grain class is not active in OrleansContracts.txt — Warning. A grain class is missing or retired in the manifest.

Grain class identity mismatch — Warning. Source and manifest grain types differ.

Removed grain class is not retired — Warning. An active manifest grain class no longer exists in source.

Duplicate grain class declaration — Warning. The manifest repeats a grain class name or identity.

Invalid invokable base type mapping — Error. A custom grain-call return type mapping cannot generate a valid invokable request.

Grain interface member removed from source — Warning. The manifest retains an RPC signature which is absent from source.