If you are getting the following exception in .Net while working on a WATIN project then the solution is simple.

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembl y ‘Interop.SHDocVw, Version=, Culture=neutral, PublicKeyToken=db7cfd3acb5 ad44e’ or one of its dependencies. The located assembly’s manifest definition do es not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: ‘Interop.SHDocVw, Version=, Culture=neutral, PublicKeyToken=db

By the first look at the exception, it seems that something went wrong on the framework level. But no, you just have to add a reference to your project of the following file that comes in the WATIN Package.


Steps for the solution:

  1. Clean the solution
  2. Add the reference to the DLL in your project (Right click References folder > Add Reference > Browse Tab)
  3. Rebuild the project
  4. Done.