I want to know if it is possible to configure known types the way described in this answer when we are using a Silverlight 4 client?
Only thing that seems to work is using the KnownType
attribute, and we'd like to avoid that solution since the classes are in different assemblies and we don't want dependencies between them.
Here's a sample of the configuration:
<?xml version="1.0"?>
<configuration>
<!-- *snip* -->
<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>
<!-- *snip* -->
</configuration>