We recently updated a bunch of dlls in our project, including HtmlAgilityPack to their latest versions. This has made the following code which had been working start throwing errors on 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()'.
The last line of the stack trace is:
"at Fizzler.Systems.HtmlAgilityPack.HtmlNodeOps.b__71(HtmlNode n)"
The QuerySelectorAll is returning an IEnumerable of HtmlNode, however I can't seem to be able to cast it to a list anymore. I would hazard a guess there is some related dll with an incompatible version now (fizzler?) missing 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.