Issue while using protobuf-net serializer for WCF
We are using protobuf-net to serialize my WCF data contract. While serializing I am gettin开发者_运维技巧g error "Duplicate tag 9 detected in FingerPrint" any suggestion?
I am not using any attribute like [ProtoContract]
, [ProtoInclude]
or [Protomember
; I am using [DataContract]
and [DataMember]
on my class.
protobuf-net will (in the lack of something more explicit) use the Order from any [DataMember] attributes; so - are there any marked 9? How many? Each identifier must be unique per-type in protobuf-net.
Can you add a [ProtoMember] to give it a new identifier? If the file is code-generated, you can also have a partial class with [ProtoPartialMember] against the type (not the member), to achieve the same thing.
ohh gr8 thanks for replying i figure out the issue why that happened. My classes contain one or more property (data member) with same order i.e order =9 that why i was getting that error. Now i am able to serialize and deserialize my classes let you know if i will face any other issue.It would be great if you tell me the limitation of the protobuf.net.
I am planning to replace all the serializer with this one.One more thing i want to add this serializer(protobuf.net) is 10 times faster then BinarySearilizer (As per my test app) Thanks one again.
精彩评论