Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Phone 7 and System.Xml.Linq library

I'm trying to follow this tutorial about WP7 development: http://mobile.tutsplus.com/tutorials/windows/introduction-to-windows-mobile-7-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?

EDIT:

The same problem is described here:
http://forums.netduino.com/index.php?/topic/1127-add-reference-net-tab-empty/

The suggested fix doesn't work for me.

EDIT:

Apparently this is a bug in the Silverlight 4 Tools: https://connect.microsoft.com/VisualStudio/feedback/details/529718/empty-net-tab-when-adding-a-reference

like image 732
Edgar Avatar asked Dec 04 '22 09:12

Edgar


2 Answers

That is the correct Assembly you need to work with XML in Windows Phone 7. Not sure why it does not show up in your Add Reference dialog.

It should be like following:

Add Reference WP7

What version of WP7 developer tools are you using?

like image 64
decyclone Avatar answered Dec 24 '22 10:12

decyclone


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.

like image 42
Derek Lakin Avatar answered Dec 24 '22 10:12

Derek Lakin