Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WatiN System.IO.FileNotFoundException Interop.SHDocVw

Tags:

.net

nunit

watin

I have just started to receive the following error when running my WatIn tests.

System.IO.FileNotFoundException : Could not load file or assembly 'Interop.SHDocVw, Version=1.1.0.0, Culture=neutral, PublicKeyToken=db7cfd3acb5ad44e' or one of its dependencies. The system cannot find the file specified.

I have searched the web and tried the following solutions, none of which work.

  • http://linrayusa.blogspot.com/2008/08/vsts-2008-could-not-load-file-or.html
  • WatiN Error Could not Load Assembly
  • http://blogs.msdn.com/b/dougste/archive/2006/09/05/741329.aspx

Can anyone assist?

like image 239
Gilbert Liddell Avatar asked Mar 25 '11 14:03

Gilbert Liddell


2 Answers

Have you tried this:

Go to solution explorer, click on the interop dll, in properties change "Embed Interop types" to FALSE.

Best to use NuGet addon for .net studio and then add reference to wattin via "Add Library Package Reference".

like image 65
scott Avatar answered Oct 01 '22 16:10

scott


Setting the Interop.SHDocVw, Microsoft.mshtml dlls' Embed Interop Types property to False;

Off course Visual Studio would give you warnings on how to ammend.

like image 30
Olanrewaju Sideeq Avatar answered Oct 01 '22 18:10

Olanrewaju Sideeq