So I found this wonderful library called WatiN - and I've downloaded the latest version - v2.1. I've opened a Console Applications (obviously C#) and wrote my most simplest program:
using WatiN.Core;
...
FireFox browser = new FireFox(@"..");
browser.Button("Send").Click();
browser.Dispose();
It's nothing much.
I obviously added a reference to my project by right-clicking the project > Add Reference > browsed to C:\...\WatiN\bin\net40
, chose WatiN.Core.dll
(like the Readme said)
The VS was auto completing my typing - and he offered me alternatives (you know - when you type con and he shows that lil' window and showing you Console
etc) - like he should, because I've added the reference.
Then I hit compile - and suddenly - VS turns blind and he can't detect the DLL I referenced.
The DLL still shows up in the References
folder in my project - but VS whines that it doesn't.
He says: The type or namespace name 'WatiN' does not exist in the namespace 'WatiN' (are you missing an assembly reference?)
Although he did not show those errors before compile - and marked Firefox
in green (because its a class).
Can anyone help me with this? Maybe well me whats wrong ?
Another thing - when double clicking the DLL in the reference (aka Object Browser) it shows me it and everything's OK - but after I try to compile - it magically disappears.
To fix a broken project reference by correcting the reference path. In Solution Explorer, right-click your project node, and then select Properties. The Project Designer appears. If you're using Visual Basic, select the References page, and then click the Reference Paths button.
Press Shift + F12 to find all references.
You add references to a shared project just as you would a normal project reference. In Visual Studio or Fire, you right-click the "References" node of the real project and choose "Add Reference", and then pick the shared project from the list.
In your project settings, change your Target Framework from ".NET Framework 4 Client Profile" to ".NET Framework 4". That did the trick for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With