I have an application that was using protobuf-net version 1.0.0.278, and I have an object that has this field in it:
[ProtoBuf.ProtoMember(6)]
public virtual DateTimeOffset? CreatedDate { get; set; }
I do not know for sure if this was being properly serialized and deserialized when serializing/deserializing the object that contained it, but there was no exception raised on either operation.
Recently I updated to protobuf-net version 2.0.0.621, and now I get a System.InvalidOperationException calling ProtoBuf.Serializer.PrepareSerializer<>. The message says "No serializer defined for type: System.Nullable`1[[System.DateTimeOffset, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]".
Is there a protobuf-net native way to serialize this type? Is there any reason why this behavior changed?