DataContractAttribute Class is in the System.Runtime.Serialization namespace.But you should add reference to System.Runtime.Serialization.dll