HTMLAgilityPack QuerySelectorAll exception for exception, maybe Fizzler dll version mismatch?

We recently updated a bunch of dlls in our project, including HtmlAgilityPack, to their latest versions. This caused the next code that worked to throw errors in the first line.

List<HtmlNode> foundNodes = document.QuerySelectorAll(".divider").ToList(); foreach(HtmlNode node in foundNodes){ doWhatever(node); } 

Method not found: 'System.Collections.Generic.IEnumerable`1 HtmlAgilityPack.HtmlNode.Descendants ()'.

Last line of the stack trace:

" at Fizzler.Systems.HtmlAgilityPack.HtmlNodeOps.b__71 (HtmlNode n) "

QuerySelectorAll returns an IEnumerable from an HtmlNode, however I don't seem to be able to list it in a list. I would venture to suggest that there is some associated dll with an incompatible version now (fizzler?) That lacks the Descendants method? However, the NuGet page for HtmlAgilityPack shows no dependencies, and the fizzler version I'm using is 1.0.0, which I think is correct.

+5
source share
3 answers

This happens with the same error as after updating the ntet.htmlAgilityPack package.

I decided to downgrade from 1.4.9.4 to 1.4.9 at the moment.

Take a look at the next versions of this package.

+10
source

I had a very similar error, and rolling it back from 1.4.9.5 to version 1.4.9 resolved it, not quite sure why.

+1
source

Disclaimer : I am the owner of the Html Agility Pack project

Version 1.5.0 has been released, and this problem has been fixed in version v1.5.0-beta5.

This was because the default parameter was added to the v1.4.9.5 method

Because the library is heavily named, Fizzler could no longer find this method.

+1
source

All Articles