0
votes

I am getting a strange error after trying to compile under 2010. The compiler doesn't seem to understand my [DataMember] attribute:

error CS0246: The type or namespace name 'DataMember' could not be found (are you missing a using directive or an assembly reference?)

Shouldn't this all be defined in System.Runtime.Serialization?

Any insight would be very much appreciated.

1
What happens if you fully-qualify the attribute? [System.Runtime.Serialization.DataMember]? - John Saunders
Which version of target framework do you use in your project? - Ladislav Mrnka

1 Answers

0
votes

I had a similar issue when porting a Web Test Plugin project from 2008 to 2010. You may need to re-reference the assembly that's giving you the problem, to ensure your project is referencing the correct version for the framework you're using.