Why can't I use htmlagilitypack with windows phone 8? What else can I use to Parse HTML in WP8?

早过忘川 提交于 2020-01-12 04:44:06

问题


Why can't I use htmlagilitypack with windows phone 8? I appears to be supported on all platforms including Win8 Win8RT and WP7/WP7.5 and Silverlight 5. Is there one of the DLLS that would work?

What else can I use to Parse HTML in WP8? All suggestions are for the htmlagilitypack.


回答1:


The issue appears to be that the NuGet package references the incorrect assembly for WP8.

By default it seems that it references the binary in sl4-windowsphone71, manually removing the reference to the HtmlAgilityPack DLL and referencing the binary in the sl3-wp folder removes the dependency problem.

That is how I have resolved it anyway.




回答2:


As anthony mentioned, just replace the reference from sl4-windowsphone71 to sl3-wp and it will work.




回答3:


It seems that Windows Phone 8 doesn't like the System.Xml.XPath.dll from the Silverlight SDK. My app that works fine on Windows Phone 7.5, won't work on WP 8. I am currently researching for another alternative for HTML Agility Pack.




回答4:


You probalby can and you've either forgot to unblock the web downloaded DLLs or forgot to update your NuGet package manager. Let me know if that isn't the case.




回答5:


The portable class library version of htmlagilitypack:

https://github.com/Deathspike/HtmlAgilityPack-PCL

it is out on nuget!




回答6:


In my lib folder, sl3-wp folder is empty.

I fixed by downloading HtmlAgilityPack-PCL from NuGet Manager



来源:https://stackoverflow.com/questions/14164504/why-cant-i-use-htmlagilitypack-with-windows-phone-8-what-else-can-i-use-to-par

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