I want to know if known types can be configured as described in this answer when we use the Silverlight 4 client?
The only thing that works is to use the KnownType attribute, and we would like to avoid this solution, because the classes are in different assemblies, and we do not want dependencies between them.
Here's a sample configuration:
<?xml version="1.0"?> <configuration> <system.runtime.serialization> <dataContractSerializer> <declaredTypes> <add type="Foo.Dto.FooDto, Foo.Dto, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL"> <knownType type="Foo.Dto.BarDto, Foo.Dto, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL" /> <knownType type="Foo.Dto.BizDto, Foo.Dto, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL" /> </add> </declaredTypes> </dataContractSerializer> </system.runtime.serialization> </configuration>
source share