Protobuf-net serialization error = “The type cannot be changed once a serializer has been generated”
问题 The following scenario seems to cause the exception in Protobuf.net on deserialization. Have I done something wrong? Is there a way round this? [ProtoContract] [ProtoInclude(2, typeof(Ant))] [ProtoInclude(3, typeof(Cat))] public interface IBeast { [ProtoMember(1)] string Name { get; set; } } [ProtoContract] public class Ant : IBeast { public string Name { get; set; } } [ProtoContract] public class Cat : IBeast { public string Name { get; set; } } [ProtoContract] [ProtoInclude(1, typeof