Windows Phone 7 and System.Xml.Linq library

痴心易碎 提交于 2019-12-01 04:46:44

问题


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


回答1:


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.




回答2:


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?




回答3:


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...



来源:https://stackoverflow.com/questions/5119312/windows-phone-7-and-system-xml-linq-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!