开发者

Watin reference problem

When i add watin reference to solution, i can write code, i'm able to see IE class intance methods but when start debugging, it says

The type or 开发者_JS百科namespace name 'WatiN' could not be found (are you missing a using directive or an assembly reference?)

Then i see nothing about instance methods although " using WatiN.Core; " statements.

i tried both console, winforms and WPF app but the same things happens. Any comments?


If you are using VS 2010 - check to see if the assembly is targeting .Net 4.0 Client Profile. Change that to .Net 4.0 or .Net 3.5 depending on your needs.

Watin is probably built using 3.0 or 3.5sp1 not 4.0 Client Profile - and will thus not work with Client Profile. EDIT: VS 2010 has 4.0 Client Profile set as default target framework in new projects for some stupid reason.


I also faced same problem and it worked fine once I change the target framework to 3.0 or 3.5. But people may not be aware of how to change target framework. Here are the steps to change target framework:

  1. Click on properties of project
  2. Click on application
  3. Change the target frame work 3.0 or 3.5 as watin is not supporting for 4.0 and 4 client profile
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜