One way to solve this problem is to let the serializer to know of the subclasses of the base classes. For example, if you declare the class Fruit with its "known" subclasses, it should work out well:
[System.Runtime.Serialization.KnownType(typeof(Apple))]
public class Fruit {
// ...
}
public class Apple : Fruit {
// ...
}
We're working to solve this problem in the RC release of the framework.
CarlosFiguei...
Member
99 Points
19 Posts
Microsoft
Re: You must write an attribute 'type'='object' after writing the attribute with local name '__ty...
Feb 26, 2012 10:17 PM|LINK
One way to solve this problem is to let the serializer to know of the subclasses of the base classes. For example, if you declare the class Fruit with its "known" subclasses, it should work out well:
[System.Runtime.Serialization.KnownType(typeof(Apple))] public class Fruit { // ... } public class Apple : Fruit { // ... }We're working to solve this problem in the RC release of the framework.