Error - DataContractAttribute could not be found

The type or namespace name 'DataContractAttribute' could not be found
(are you missing a using directive or an assembly reference?)
The type or namespace name 'DataContract' could not be found (are you
missing a using directive or an assembly reference?)
The type or namespace name 'DataMemberAttribute' could not be found
(are you missing a using directive or an assembly reference?)
The type or namespace name 'DataMember' could not be found (are you
missing a using directive or an assembly reference?)


Solution:

You're just missing a reference to "System.Runtime.Serialization". It's a built-in .NET library, so you can find it under the ".NET" tab of your add references dialog.


 

Comments

Popular posts from this blog

Convert XElement to DataTable

Enable mouse scroll-wheel in VB6

Performance of 'is' vs typeof (Reflection) in C#