Crash on startup using HtmlAgilityPack from Nuget in WP7 project
description
Hello,
I have created a WP7 project (OS 7.1) in Visual Studio 2010.
Using Nuget I have installed HtmlAgilityPack and now I have the referenced DLL from the folowing path <myProjectDir>\packages\HtmlAgilityPack.1.4.3\lib\sl4-windowsphone71\HtmlAgilityPack.dll.
In the MainPage constructor I simple have the following line of code :
HtmlWeb htmlWeb = new HtmlWeb();
with using HtmlAgilityPack; on top.
When I run the app, the MainPage constructor isn't called and the app crashes so the App.cs method RootFrame_NavigationFailed is executed. The exception is the following "TargetInvocationException" and
System.TypeLoadException: Could not load type 'HtmlAgilityPack.HtmlWeb' from assembly 'HtmlAgilityPack, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Why ?
Thanks,
Paolo.