Can not find "HtmlDocument.cs"
An error occurred while executing this line of code
var DOM = new HtmlAgilityPack.HtmlDocument();

Hello @bigestyjoy ,
Which version of Html Agility Pack did you try? And for which Framework?
Best Regards,
Jonathan
Hello @JonathanMagnan , I have tried Html Agility Pack version 1.5.0, 1.5.1, 1.5.2, 1.5.3, with my ASP.NET(.NET Framework) project targeting .NET Framework 4.6.2.
In addition, the error message means that it can not find "HtmlDocument.cs", and try to search in the following list of folder. The folder "C:\Users\Jonathan\..." shown in the error message dose not exist on my computer.
Thanks.
I tried using Html Agility Pack in a console project and didn't have any problem. It happens in ASP.NET project, event I create a new ASP.NET project and just install Html Agility Pack, write a single line code in HomeController.
public class HomeController : Controller
{
public ActionResult Index()
{
var DOM = new HtmlAgilityPack.HtmlDocument(); // error
return View();
}
}
Hello @bigestyjoy ,
Unfortunately I'm not able to reproduce this issue. On my side it always work.
Do you think you could send me this empty project? Perhaps I'm missing something obvious.
Btw, it's normal the "C:\Users\Jonathan\..." doesn't exists. This path is show because is the build path on my computer.
Best Regards,
Jonathan