ericvana / protobuf-net

Automatically exported from code.google.com/p/protobuf-net
Other
0 stars 0 forks source link

DataMembers of type object don't serialize with WCF #281

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please include an e-mail address if this might need a dialogue!
ndenkha@gmail.com
==============

What steps will reproduce the problem?
1. Define these classes and make it be returned through WCF service.

[ProtoContract]
    public class Class1 : BaseClass
    {
        [ProtoMember(1)]
        public object Field1 { get; set; }
    }

[ProtoInclude(112, typeof(Class1))]
    public abstract class BaseClass
    {
        [ProtoMember(1)]
        public virtual string Name { get; set; }

        public BaseClass() {}
    }

What is the expected output? What do you see instead?
The property should be serialized, but I get the exception 
InvalidOperationException: No serializer defined for type: System.Object

What version of the product are you using? On what operating system?
I've used both versions 2.0.0.431 and 2.0.0.480 on Win7 32bit.

Please provide any additional information below.

Original issue reported on code.google.com by nden...@gmail.com on 22 Mar 2012 at 12:20

GoogleCodeExporter commented 9 years ago
Hi All,

Getting the same problem when using 2.0.0.668

Thanks,
Evgeny
evgenyv@yahoo.com

Original comment by evgen...@gmail.com on 25 Nov 2013 at 12:25