I have an enum with the flags that I decorate attribute [ProtoMember], which serializes and deserializes in my local field running Win7 x64.
However, my use case includes serializing on a server running Windows Server 2008 R2 Enterprise 64-bit and deserializing in my local field. When I Deserializes, I get an exception: "overflow exception was untreated; arithmetic operation resulted in an overflow." He seems to have been thrown out of ProtoBuf.Serializers.CompiledSerializer.ProtoBuf.Serializers.IProtoSerializer.Read (object value, the source ProtoReader).
I tried changing the enum to int and serializing on server / deserialization works locally. I would like to use an enumeration instead of an int. What am I doing wrong?
Not sure it's relevant information, but an executable file that I run on a server that is built on my local box.
Enumeration refers to reference external dll. When I duplicate the enumeration code in my solution, deserialization works. An exception occurs only when I use an enumeration from an external dll (where I suspect that the source code is unknown), and the enumeration value is larger (it seems) 128. In my case, Status.Zeta and Status. Everyone threw an exception; other enum value deserialized properly. The enumeration is defined as such:
[Flags] public enum Status { None = 0, Alpha = 1, Beta = 8, Gamma = 16, Delta = 32, Epsilon = 64, Zeta = 132, All = 255, }
I can not change the code in the dll. How can I do this job? Do I need a .proto file? I try to avoid this if possible.
source share