【发布时间】:2016-01-14 19:00:54
【问题描述】:
根据 MSDN,System.Xml.XPath 中的 Extensions 类应该可用于通用 Windows 平台(Windows 10):
https://msdn.microsoft.com/en-us/library/system.xml.xpath.extensions(v=vs.110).aspx
但是在默认配置中,甚至 System.Xml.XPath 命名空间都不可用。 编译器和 IntelliSense 没有找到它,甚至 Resharper 也无法找到丢失的参考 - 尽管根据 MSDN,它应该在 System.Xml.Linq.dll 中。 (我可以毫无问题地使用 LINQ)
在参考管理器中我也找不到合适的组件。
通过一些研究,我在 NuGet 上找到了这个官方 System.Xml.XPath 包: https://www.nuget.org/packages/System.Xml.XPath/
但是,它也不包含 Extension 类(因此也不包含 XPathSelectElement 扩展方法)。 (但至少是其他 XPath 类)
我是不是做错了什么,或者这是文档中的错误,并且这些类都不适用于 Windows 10?
编辑: 我已经做过的事情:
- Visual Studio 重启
- Windows 重新启动
- 在另一台计算机上测试
【问题讨论】: