Could not load file or assembly 'MSHTML, Versi

2019-08-24 17:48发布

问题:

So I am working on a ASP.NET/C# application. It basically scrapes a certain website based on some parameters. I open my project and try to run it. It seems to work fine until I try to actually scrape the site I get this error:

Could not load file or assembly 'MSHTML, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Which is weird because I have a similar project using the same dll's and no I have no problems.

回答1:

So I removed the reference to the DLL and added again. It seems to be working now.