Search code examples
c#xmlserializerdatacontractserializerdatacontract

compiler does not recognize System.Runtime.Serialization.DataContractSerializer c#


I try to use System.Runtime.Serialization.DataContractSerializer, but I get a compiler error:

"The type or namespace 'DataContractSerializer' does not exist in the namespace 'System.Runtime.Serialization' "

What could be causing this error?


Solution

  • Add reference to System.Runtime.Serialization assembly in your project.