在 .Net 4.X 中,此扩展方法在 System.Xml.XPath 下。
In .Net 4.X, this extension method is under System.Xml.XPath.
但是我想知道如何在.Net Core中找到/使用它?我有一个类库。
However I'd like to know how could I find/use it in .Net Core? I have a class library.
移植工具未显示任何有关 XPathSelectElement 的信息。
The porting tool doesn't show anything about XPathSelectElement.
还是.Net核心中的替代品?
Or maybe any replacement in .Net core?
非常感谢!
推荐答案您需要添加软件包 System.Xml.XPath.XDocument 4.0.1 。该软件包提供了扩展方法,这些扩展方法将 System.Xml.XPath 支持添加到 System.Xml.XDocument 软件包中。
You need to add package System.Xml.XPath.XDocument 4.0.1. This package provides extension methods that add System.Xml.XPath support to the System.Xml.XDocument package.
在Package Manager控制台中运行以下命令。
Run below command in Package Manager Console.
PM> Install-Package System.Xml.XPath.XDocument -Version 4.0.1也可以从以下位置安装具有版本 NuGet 2.12 或更高版本的NuGet软件包管理器。
You can also install it from NuGet package manager having version NuGet 2.12 or higher.
更多推荐
如何在.Net Core 1.0中使用XPathSelectElement?
发布评论