referencing project class within Solution

D

Dave

I have a Solution with two projects. I am trying to
reference a class in project2 from project1. When I
right click on the project1 references (in Solutions
explorer)and attempt to add a reference, I get the add
reference window, I click on Project tab and browse to my
solution/project folder and then to the project2.exe.
However, I recieve an error ... seems like it is looking
for a file with a dll extenstion. I'm a rookie at
this ... but it seems so simple. Can anyone tell me how
to reference a class within a project in the same
solution? Appreciate any ideas .... Thanks!
 
J

Jip from Paris

This is normal behavior. You can only reference DLL's because setting up a
reference calls for loading the referenced item in the referrer process at
runtime. The windows loader doesn't know how to load several EXE's in a
single process.

Now the interesting question is why do you try to reference project2 from
project1. What kind of benefit do you expect for project1 ?
 
D

Dave

okay ... so how do I refer to a class in another project
within the same solution? ... remember I'm a rookie.
 
D

Dave

I am building a series of database maintenance forms that
are built as seperate projects. These forms use a common
arraylist class that is used for listboxes and combo
boxes. Only want to have to maintain this arraylist code
in one module ... make sense? Or is my approach wrong?
Appreciate your help/ideas.
(I thought of having one big project... but since two of
us are working on this, it seemed like it would be a
control problem)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top