Search code examples
c#.netnugetwatin

Embedded Interop Types using WatiN


I'm trying to use WatiN for basic unit-testing purposes. I've installed the latest version through NuGet.

However, I get a collision between the Interlope types, so I understood I should set the EmbedInteropType properties to false.

The problem is, I just can't understand how to do that. I'm using the VS 2010 .Net 4 framework.

Can anybody just quickly explain to me how to access the properties and change that?

Edit: The exact message is:

A reference was created to embedded interop assembly (the project path)\lib\net40\Microsoft.mshtml.dll' because of an indirect reference to that assembly created by assembly '(Project path)\packages\WatiN.2.1.0\lib\net40\WatiN.Core.dll'. Consider changing the 'Embed Interop Types' property on either assembly.


Solution

  • I am not sure if using WatiN for unit testing is a great idea. We used WatiN for browser testing but decided to move to selenium. This was mainly because Watin has not been updated since 2011. However in order to change the EmbedInteropType to false. In your project expand all references and find the assembly Microsoft.mshtml.dll press F4, change the EmbedInteropType to false and that should be all.