I am using System.Xml.Linq
But is unable to add an reference to it, the following error appears whenever I tried adding the reference from Microsoft framework
“can’t add reference to System.xml.linq.dll as it is not built against silverlight runtime.”
I am using Visual Studio 2010, silverlight 4.0
You are probably picking the wrong version. There is one for Silverlight and one for “regular” .NET. Here is a similar question.
They added a reference to the Silverlight version in
"C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Libraries\Client\". But you’d want either"C:\Program Files\Microsoft SDKs\Silverlight\v4.0\Libraries\Client"or"C:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client", dpending on if you are on a 64-bit machine.