By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,955 Members | 1,793 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,955 IT Pros & Developers. It's quick & easy.

referencing project class within Solution

P: n/a
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!
Jul 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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 ?

"Dave" <da***@ccrtc.com> wrote in message
news:03****************************@phx.gbl...
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!

Jul 19 '05 #2

P: n/a
okay ... so how do I refer to a class in another project
within the same solution? ... remember I'm a rookie.
-----Original Message-----
This is normal behavior. You can only reference DLL's because setting up areference calls for loading the referenced item in the referrer process atruntime. The windows loader doesn't know how to load several EXE's in asingle process.

Now the interesting question is why do you try to reference project2 fromproject1. What kind of benefit do you expect for project1 ?
"Dave" <da***@ccrtc.com> wrote in message
news:03****************************@phx.gbl...
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!

.

Jul 19 '05 #3

P: n/a
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)
-----Original Message-----
okay ... so how do I refer to a class in another project
within the same solution? ... remember I'm a rookie.
-----Original Message-----
This is normal behavior. You can only reference DLL'sbecause 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 ?

"Dave" <da***@ccrtc.com> wrote in message
news:03****************************@phx.gbl...
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
tomy solution/project folder and then to the project2.exe.
However, I recieve an error ... seems like it islooking for a file with a dll extenstion. I'm a rookie at
this ... but it seems so simple. Can anyone tell mehow to reference a class within a project in the same
solution? Appreciate any ideas .... Thanks!

.

.

Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.