Well... Visual Studio, has been quite verbose and explained why it's highlighting your [DataContract] and [DataMember] attributes.
Read the error again:
The type or namespace name 'DataContract' could not be found (are you missing a using directive or an assembly reference?)
As you can see Visual Studio, is assuming that there are two possible reasons for that issue:
missing a using directive
As @isoftech mentioned, you should add the
using System.Runtime.Serialization; and it seems like you've done that already.
an assembly reference
As @isoftech explains again on point #3 on his post, You should be adding the System.Runtime.Serialization reference to your project references. follow his tips.
That's all you need to do.