title: How to serialize a derived type as its base type with WCF
body: <p>I have a common library with some objects in it.  Then I have a service project that references the common library and creates some derived types from objects in the common library.</p>
  
  <p>I want my service to serialize the derived types as their base types defined in the common library.</p>
  
  <p>I cannot use KnownTypes on the objects in the common library because I don't want the common library referencing the service assemblies.</p>
  
  <p>So how can I have wcf serialize the derived types as their base types?</p>
  
  <p>I wish I could do something like...</p>
  
  <p>[DataContract(SerializeAsType = typeof(BaseType))]
  public class DerivedType : BaseType
  {
  }</p>
  
  <p>Is anything like this possible?</p>