Windows Phone 7 and the System.Xml.Linq library


I'm trying to follow this tutorial about WP7 development:

It's talking about using XElements, which require the System.Xml.Linq library, but I can't find a way to add it to the project references. When I go to add reference, the .NET list is empty, and it's saying it's filtered to Windows Phone 7.

The tutorial might be out of date. Is the library even available for WP7? Is there a different way to read XML on the platform?

How can I get it working?


The same problem is described here:

The suggested fix doesn't work for me.


Apparently this is a bug in the Silverlight 4 Tools:

The assembly list should not be empty when adding a reference from the .NET tab even for a Windows Phone 7 project, so it sounds like you might have an issue with Visual Studio.

However, you could try using the Browse tab instead. On my system (64-bit), the assembly is in the C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone folder.