title: Powershell and HtmlAgilityPack
body: <p>I have some screen scraping I need to do using Powershell and ran across this article</p>
  
  <p><a href="http://www.leeholmes.com/blog/2010/03/05/html-agility-pack-rocks-your-screen-scraping-world/" rel="nofollow">http://www.leeholmes.com/blog/2010/03/05/html-agility-pack-rocks-your-screen-scraping-world/</a></p>
  
  <p>And wanted to get a quick demo up and running.   However, I'm running into a snag right away and not sure why it's failing.</p>
  
  <p>The code is below:</p>
  
  <pre><code>add-type -Path "C:\TEMP\HtmlAgilityPack\Net20\HtmlAgilityPack.dll"
  </code></pre>
  
  <p>Right away, I get the following error:</p>
  
  <pre><code>PS C:\TEMP\HtmlAgilityPack\Net20&gt; add-type -Path "C:\TEMP\HtmlAgilityPack\Net20\HtmlAgilityPack.dll"
  Add-Type : Could not load file or assembly 'file:///C:\TEMP\HtmlAgilityPack\Net20\HtmlAgilityPack.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
  At line:1 char:9
  + add-type &lt;&lt;&lt;&lt;  -Path "C:\TEMP\HtmlAgilityPack\Net20\HtmlAgilityPack.dll"
      + CategoryInfo          : NotSpecified: (:) [Add-Type], BadImageFormatException
      + FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShell.Commands.AddTypeCommand
  </code></pre>