DataContractAttribute
Class is in the System.Runtime.Serialization
namespace.
You should add a reference to System.Runtime.Serialization.dll
. That assembly isn’t referenced by default though. To add the reference to your project you have to go to References -> Add Reference in the Solution Explorer and add an assembly reference manually.