While using ProtoBuf-Net and serializing an enum property, where the enum is set to [FlagsAttribute], I received the following error message when serializing an enum value composed of multiple flags.
The error is: The value (MyEnum.MyValue) has no wire-representation for property MyProperty
Where MyEnum is:
[Flags]
public Enum MyEnum
{
MyValue = 0,
MyValue1 = 1,
MyValue2 = 2,
MyValue4 = 4,
MyValue8 = 8,
}
and
MyProperty = MyEnum.MyValue2 | MyEnum.MyValue4;
Seems to be a bug in protobuf-net?