WatiN and the .Net 4.0 Client Profile

This is one of those I had to learn twice before it stuck-

When using WatiN with a .Net application (which is, uh, always), I’ve had my project fail to recognize the WatiN namespace… on two occasions.

Especially when building on WPF, it seems visual studio defaults to the .Net client profile, which does not include the system.web libraries that WatiN requires. So after banging your head on the wall for a while, you might notice that there is one or two “warnings” in visual studio.. open those up, and you’ll see the warning about a dependency of WatiN, System.Web dot blah blah cannot be found etc.

Changing from the client profile to the full .Net 4.0 framework fixes this.

(now, after writing this, maybe I won’t forget on the third time)

Leave a Reply

Your email address will not be published. Required fields are marked *