html-agility-pack icon indicating copy to clipboard operation
html-agility-pack copied to clipboard

Can not find "HtmlDocument.cs"

Open bigestyjoy opened this issue 8 years ago • 4 comments

An error occurred while executing this line of code var DOM = new HtmlAgilityPack.HtmlDocument(); error

bigestyjoy avatar Sep 07 '17 09:09 bigestyjoy

Hello @bigestyjoy ,

Which version of Html Agility Pack did you try? And for which Framework?

Best Regards,

Jonathan

JonathanMagnan avatar Sep 07 '17 12:09 JonathanMagnan

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.

bigestyjoy avatar Sep 08 '17 01:09 bigestyjoy

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();
        }
}

bigestyjoy avatar Sep 08 '17 03:09 bigestyjoy

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

JonathanMagnan avatar Sep 12 '17 22:09 JonathanMagnan