Sorry for the delay - I didn't spot this until just now...

The key thing (for protobuf-net) is that there are matching contracts
at each end. They don't have to be the same types, but they must be
compatible. If you are using xml serialization markers, then it uses
the XmlElement.Order property as the tag for protobuf-net.

If is entirely possible that your serialization process doesn't emit
tags with an Order, in which case you can either:

 - edit the generated code (yeuch) to attach a [ProtoMember(...)]
 - add a partial class to declare the attributes

In particular, you can use (for example):

        [ProtoPartialMember(1, "Foo")]
        [ProtoPartialMember(2, "Bar")]
        partial class YourType { }

Not as nice as decorating properties directly, but it should at least

The other option is to generate both the client and server code
(perhaps via ProtoGen) to be compatible, but ultimately protobuf-net
works at runtime, not as a compile tool.

If you can give more context to the nature of the classes (at client
and/or server) I can probably advise more. Either here or at

I'm off to set summary e-mails to send immediately, rather than

Marc Gravell

You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to