Html Agility Pack Dll [duplicate]

孤街醉人 提交于 2019-12-24 17:15:14

问题


I have downloaded the HTML Agility pack but I don't know which one should I import .There are lots of folders and I don't know which one to import dll . Folders:

    Net20
    Net40
    net40-client
    Net45
    sl3-wp
    sl4
    sl4-windowsphone71
    sl5
    winrt45

I tried importing winrt45 but am getting error when I use doc.DocumentElement.SelectNodes (There is no reference ) I have tried

    using HtmlAgilityPack.HtmlDocument;
    using HtmlAgilityPack;

but doesn't work


回答1:


The correct assembly to reference strongly depends on your target framework.

This release includes versions of Html Agility Pack for .NET 2.0 - 4.5, Silverlight 4-5, Windows Phone 7-7.1 and Windows 8 Metro.

(Source: http://htmlagilitypack.codeplex.com/releases/view/90925)

According to the quote above:

Directory             | Framework
----------------------+-------------------------------------------
Net20                 | .NET 2.0
Net40                 | .NET 4.0
net40-client          | .NET 4.0 Client Profile
Net45                 | .NET 4.5
sl3-wp                | Silverlight 3
sl4                   | Silverlight 4
sl4-windowsphone71    | Silverlight 4 used by Windows Phone 7.1+
sl5                   | Silverlight 5
winrt45               | Windows RT

NuGet

The preferred method of referencing HtmlAgilityPack is through nuget:
http://nuget.org/packages/HtmlAgilityPack



来源:https://stackoverflow.com/questions/20647621/html-agility-pack-dll

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