This sounds very protobuf-net specific; it might be easier to take this off-group, but I think I'll need a bit more context; in particular, since it is a PCL type, what runtime is this on when erroring? Also, are you using Serializer.*, or are you creating an instance of the custom serializer created by the precompiler? And any chance of seeing the actual Serialize call? Annoyingly, my first suspicion is an internal bug, probably relating to the different overloads on the different frameworks.
Marc On 8 Sep 2012, at 22:34, Luke Pulverenti <luke.pulvere...@gmail.com> wrote: > Marc, > > I have a DTO class library which I'm running your precompiler against. > > When I attempt to use this to Serialize, I receive the following error: > > Type=System.InvalidOperationException Msg=Type is not expected,, and no > contract can be inferred: System.RuntimeType StackTrace= [n] at > ProtoBuf.Meta.TypeModel.ThrowUnexpectedType(Type type) in > c:\Dev\protobuf-net\protobuf-net\Meta\TypeModel.cs:line > > Oddly enough, de-serialization works perfectly. I'm not sure if this matters, > but the DTO library is also a portable class library. All of the entities > within are tagged with ProtoContract and ProtoMember attributes. > > Any ideas what the issue might be? Thanks. > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/protobuf/-/6_LgIN2a8U0J. > To post to this group, send email to protobuf@googlegroups.com. > To unsubscribe from this group, send email to > protobuf+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/protobuf?hl=en. -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.