Powershell を使用して行う必要があるスクリーン スクレイピングがあり、この記事に出くわしました
http://www.leeholmes.com/blog/2010/03/05/html-agility-pack-rocks-your-screen-scraping-world/
そして、簡単なデモを立ち上げて実行したいと考えていました。ただし、すぐに障害が発生し、なぜ失敗するのかわかりません。
コードは以下のとおりです。
add-type -Path "C:\TEMP\HtmlAgilityPack\Net20\HtmlAgilityPack.dll"
すぐに、次のエラーが表示されます。
PS C:\TEMP\HtmlAgilityPack\Net20> 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 <<<< -Path "C:\TEMP\HtmlAgilityPack\Net20\HtmlAgilityPack.dll"
+ CategoryInfo : NotSpecified: (:) [Add-Type], BadImageFormatException
+ FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShell.Commands.AddTypeCommand