Accessing procedures from another project

I'm writing a Windows Console project, trying to access procedures in a second project in the same solution.

I added a reference to the 2nd project, but Visual Studio still complains.

Visual Studio
I'm trying to access WatiN.Core.IE()
deleydSoftware EngineerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gustav BrockCIOCommented:
Did you also add the other project as a reference?
It should list in folder References of the current project. Only Core seems listed.

Ram PatilDeveloperCommented:
From the screen-shot, it looks like all the errors are related to WatiN. I do not see WatiN references added to the console project.  Please add and you will be done.
deleydSoftware EngineerAuthor Commented:
"Core" is the project where WatiN is. It's confusing.

IE.csBelow the comments it starts with:
	public class IE : Browser

Open in new window

Corescrolling down a little...
Core where IE isand there's IE.cs, the procedure I want to call from my own project MyProject.
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

deleydSoftware EngineerAuthor Commented:
[The procedure I want to call is IE, in file IE.cs . (Not "IE.cs is the procedure")]
Ram PatilDeveloperCommented:
Yeah, if you Right click on  'Core' project, you will see the name of the produced assembly and it's namespace is - 'WatiN.Core'.

If you want to use WatiN in your Windows Console project, add references to 'Interop.SHDocVw.dll' and 'Microsoft.mshtml.dll' as well to your project.  You will find them in unzipped folder of WatiN - bin\net40

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
deleydSoftware EngineerAuthor Commented:
OK I added that, but I still can't seem to reference IE from MyTest01.

Visual Studio
I have "Core" in my references, which is where WatiN is, but still any reference to WatiN or Core it complains.
Gustav BrockCIOCommented:
I still believe you miss to add a reference to WatiN.Core - for example as seen here in the intro video:

deleydSoftware EngineerAuthor Commented:
I'm wondering if perhaps "Browser Helper Object" might be a better way to go.

I tried adding by hand a 2nd project called "WatiN.Core" and then adding all the WatiN source files by hand. It almost worked, but it wasn't happy that I added Microsoft Internet Controls for shdocvw. I guess I have to somehow add a reference to Interop.SHDocVw instead, but I don't see how.

Now I'm wondering if "Browser Helper Object" is a better way to go, as the website I want to interact with is "IE-Only".
deleydSoftware EngineerAuthor Commented:
Most curious. I added by hand the WatiN.Core class and all the code files that go in it, but I still can't reference it.

I then tried adding by hand a test ClassLibrary1, and referencing that works fine!

Could there be something special about the name WatiN.Core?

ClassLibrary1 works fine. WatiN doesn't work
Gustav BrockCIOCommented:
Try to reinstall it as shown in the video above.

/ gustav
deleydSoftware EngineerAuthor Commented:
Yes I looked there and when I go to that place and search for WatiN, WatiN doesn't show up as an option.

I seem to be having some success renaming everything to WatinCore instead of WatiN.Core. I've no idea why one should work and not the other.
Gustav BrockCIOCommented:
That sounds weird.

deleydSoftware EngineerAuthor Commented:
Thank you for mentioning  'Interop.SHDocVw.dll' and 'Microsoft.mshtml.dll' .
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.