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()
deleydAsked:
Who is Participating?
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.

/gustav
0
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.
0
deleydAuthor 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.
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

deleydAuthor Commented:
[The procedure I want to call is IE, in file IE.cs . (Not "IE.cs is the procedure")]
0
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
0

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
deleydAuthor 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.
0
Gustav BrockCIOCommented:
I still believe you miss to add a reference to WatiN.Core - for example as seen here in the intro video:

http://watin.org/documentation/getting-started/

/gustav
0
deleydAuthor 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".
0
deleydAuthor 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
0
Gustav BrockCIOCommented:
Try to reinstall it as shown in the video above.

/ gustav
0
deleydAuthor 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.
0
Gustav BrockCIOCommented:
That sounds weird.

/gustav
0
deleydAuthor Commented:
Thank you for mentioning  'Interop.SHDocVw.dll' and 'Microsoft.mshtml.dll' .
0
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
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.