ORLEANS0023: Grain class identity mismatch
| Property | Value |
|---|---|
| Category | Versioning |
| Severity | Warning |
| Code fix | Available |
A grain class matches a manifest declaration by CLR name, but its effective source GrainType differs from the manifest.
Impact
Section titled “Impact”This is a runtime identity change. It can create a new logical grain type, alter routing and storage identity, and break mixed-version operation.
How to fix
Section titled “How to fix”Restore the previous [GrainType] when the change was accidental. Update the manifest only when the identity break is intentional and its deployment and state migration have been designed.
The Update grain class alias in OrleansContracts.txt code fix accepts the source identity as the new baseline. Review the identity change before applying it.
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 the diagnostic
Section titled “Suppress the diagnostic”Suppress only for a deliberate, documented identity migration. Updating the reviewed baseline is preferable to retaining a suppression.
[*.cs]dotnet_diagnostic.ORLEANS0023.severity = none