Skip to content

ORLEANS0018: Grain interface member not declared

PropertyValue
CategoryVersioning
SeverityWarning
Code fixAvailable

An ordinary grain-interface method has no matching contract signature in OrleansContracts.txt. Method identity, generic arity, parameter types and order, and return type are part of the signature. Parameter names are not.

The method identity is the source [Id] value, the source [Alias] value, or the generated xxHash32 ID used by the Orleans code generator. The manifest records the resulting identifier before the colon, independent of how source declares it.

Older activations can receive an unknown RPC, and changed identities or payload types can cause dispatch or serialization failures during a rolling upgrade.

Prefer preserving the existing method and adding a new method for changed behavior. Review payload compatibility, increment the interface version when appropriate, and apply Add to OrleansContracts.txt. The code fix records the CLR signature and effective wire identity in the manifest. Source attributes remain unchanged.

Apply Regenerate OrleansContracts.txt to rebuild the complete project manifest. Run regeneration separately for each contract project and review the generated diff using the contract compatibility guidance.

Suppress only for a demonstrated signature-normalization false positive where the source and manifest represent the same contract.

[*.cs]
dotnet_diagnostic.ORLEANS0018.severity = none

See Backward compatibility guidelines.