tags:

views:

779

answers:

4

I am working on a new test project with watiN, but always get this error,

Could not load file or assembly 'WatiN.Core, Version=2.0.3.913, Culture=neutral, PublicKeyToken=db7cfd3acb5ad44e' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Did I miss something? thanks.

A: 

Do you need to add a reference in your project to the WatiN assembly? Or possibly copy the WatiN assembly to your /bin folder?

JerSchneid
+8  A: 

The assembly appears to be strongly named so you can install it in the GAC (open C:\windows\assembly and drag the dll into there). You may need to download it from the internet if you can't find it on your computer.

Failing that, are you on a 64 bit computer? It may be that watin requires you to execute your program as a 32 bit application (In Visual Studio, this is under the "Build Configuration" section).

Matthew Steeples
You are right. I changed the platform target to x86 and it's working. thanks.
Estelle
Just saved me hours! Thanks!!!
Zaffiro
A: 

Another thanks for build configuration fix!

+1  A: 

If you needs to run WatiN in 64 bit , you can get the source and change the target platform to x64 in the project properties.Rebuild the project and reference the new 64 bit WatiN.Core.It should work.

Ybbest