title: How to add HtmlAgilityPack to the Visual Studio 2010 project
body: <p>I've downloaded the latest version of HtmlAgilityPack, where have found several folders like Net20, Net40 and etc. I created a new project and added HtmlAgilityPack via add Reference.. (I chose .dll from Net20 folder), then wrote a simple code where added <code>using HtmlAgilityPack;</code>. So now i have an error that symbol cannot be used in a using-declaration.</p>
  
  <p>What's wrong? i guess that i did something wrong with the library.</p>
  
  <pre><code>using HtmlAgilityPack;
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
  int main()
  {
  HtmlAgilityPack.HtmlDocument htmlDoc = new HtmlAgilityPack.HtmlDocument();
  
      // There are various options, set as needed
      htmlDoc.OptionFixNestedTags=true;
  
      // filePath is a path to a file containing the html
      htmlDoc.Load(filePath);
  
      // Use:  htmlDoc.LoadXML(xmlString);  to load from a string
  
     // ParseErrors is an ArrayList containing any errors from the Load statement
     if (htmlDoc.ParseErrors!=null &amp;&amp; htmlDoc.ParseErrors.Count&gt;0)
     {
         // Handle any parse errors as required
  
     }
     else
     {
  
          if (htmlDoc.DocumentNode != null)
          {
              HtmlNode bodyNode = htmlDoc.DocumentNode.SelectSingleNode("//body");
  
              if (bodyNode != null)
              {
                  // Do something with bodyNode
              }
          }
      }
  }
  </code></pre>