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.
James source share