Skip to content

ORLEANS0012: Change a duplicated serialization Id

PropertyValue
CategoryUsage
SeverityError
Code fixAvailable

Two or more members of one [GenerateSerializer] type use the same constant [Id] value.

Field-ID ambiguity can deserialize data into the wrong member, corrupt payloads, and break version tolerance.

Restore the established field-ID mapping. Assign a previously unused ID only to the new or incorrect member, and never renumber IDs which have been deployed.

The code fix selects a value greater than the highest ID found in the document. Review the result carefully before applying Fix All.

Do not suppress this diagnostic for a type serialized by Orleans. Remove the serialization annotations if the type is not part of an Orleans schema.

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