I can not add a link to my project - it just does not detect it

So, I found this wonderful library called WatiN - and I downloaded the latest version - v2.1. I opened console applications (obviously C #) and wrote my simplest program:

using WatiN.Core; ... FireFox browser = new FireFox(@".."); browser.Button("Send").Click(); browser.Dispose(); 

Nothing special. I obviously added a link to my project by right-clicking the project> Add Link> in a browser on C:\...\WatiN\bin\net40 , selecting WatiN.Core.dll (for example, Readme said) VS automatically completed my typing - and he offered me alternatives (you know - when you type con and it shows this lil 'window and shows you Console , etc.) - like him, because I added the link. Then I got into compilation - and suddenly - VS went blind, and he could not detect the DLL I was referring to. The DLL is still displayed in the References folder in my project, but VS whines, which is not. He says: The type or namespace name 'WatiN' does not exist in the namespace 'WatiN' (are you missing an assembly reference?) Although it did not show these errors before compilation and is marked in green by Firefox (because it is a class). Can anyone help me with this? Maybe I'm fine, what happened? Another thing - when you double-click on the DLL in the link (aka Object Browser), it shows me this and everything is fine - but after I try to compile it magically disappears.

+8
c # dll visual-studio
source share
1 answer

In the settings of your project, change the target structure ".NET Framework 4 Client Profile" to ".NET Framework 4". It did the trick for me.

+28
source share

All Articles