Skip to content

ORLEANS0002: Reference parameter modifiers are not allowed

PropertyValue
CategoryUsage
SeverityError
Code fixNot available

An instance method on an Orleans grain, observer, extension, or system-target interface uses a ref, out, or in parameter.

Orleans RPC serializes parameter values across process boundaries. It cannot provide local reference or write-back semantics for remote calls.

Pass ordinary values and return outputs through the asynchronous result. Use a result DTO or tuple when the method returns multiple values.

Suppress only for a verified false positive where the interface is never used as an Orleans remote contract.

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