0

So I used Nuget to get the Fizzler package and it brought down the HTML agility pack, but now I have a compilation error when trying to use the library

The type or namespace name 'Systems' does not exist in the namespace 'Fizzler'

package.config contains

 <?xml version="1.0" encoding="utf-8"?>
 <packages>
    <package id="Fizzler" version="1.0.0" targetFramework="net45" />
    <package id="HtmlAgilityPack" version="1.4.9.5" targetFramework="net45" />
 </packages>

I was trying to call an HTML5 CSS3 selector method QuerySelectorAll but it gives error message ... error CS1061: 'HtmlAgilityPack.HtmlNode' does not contain a definition for 'QuerySelectorAll' and no extension method 'QuerySelectorAll' accepting a first argument of type 'HtmlAgilityPack.HtmlNode' could be found (are you missing a using directive or an assembly reference?)

S Meaden
  • 8,050
  • 3
  • 34
  • 65
  • Why do you expect to be able to use `Fizzer.Systems`? And what does that have to do with the other error you've got? Do you perhaps want `RSA.Fizzler.Systems.HtmlAgilityPack`? – Jon Skeet Dec 29 '16 at 18:33
  • 1
    Or perhaps https://www.nuget.org/packages/Fizzler.Systems.HtmlAgilityPack/? – Jon Skeet Dec 29 '16 at 18:33
  • @Jon Skeet: I want to use querySelectorAll, [as you no doubt know] it's something JQuery people have been using for years and is now part of HTML5. I'm expecting this to work out of the box. – S Meaden Dec 29 '16 at 18:36
  • @Jon Skeet: nuget.org/packages/Fizzler.Systems.HtmlAgilityPack did not solve. – S Meaden Dec 29 '16 at 18:39
  • 1
    You should show the code you did for so see ! – Rai Vu Dec 29 '16 at 18:39

1 Answers1

3

Despite your comment, it looks like you need the Fizzler.System.HtmlAgilityPack package. You should then be able to use:

using Fizzler.System.HtmlAgilityPack;

... at which point the extension methods in HtmlNodeSelection (including QuerySelectorAll) will be available.

Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194