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 m开发者_JS百科ight 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
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:
What version of WP7 developer tools are you using?
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.
Yes, LINQ to XML is definitely available for Windows Phone 7. If you aren't seeing any available references to add, that sounds like your development environment is a little bit messed up...
精彩评论