473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

referencing project class within Solution

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
3 2115
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Pollux | last post by:
I'm having trouble doing someting apparently simple. I'm still not very familiar with Visual Studio 2003, so apologies if I've missed something obvious. Basically my problem is the following. I...
1
by: psduckie | last post by:
PRODUCT: C# 2005 Beta 1 I wrote a class library and want to include it in my Windows application. The namespace of the class library is TokenizerClasses. How do I do it? I already included it...
1
by: DjordjeD | last post by:
I need to call(reference) class member "PrintDestination.PrintDestinationPrinter" from another file. How do I do it, I tried "ReportRenderer.PrintDestination.PrintDestinationPrinter" but it...
1
by: Sasha Nikolic | last post by:
I have defined a managed class ( __gc ) and a unmanaged ( __nogc ) in a separate files (but in the same vc++ dotnet project). I have no problem of referencing the unmanaged class from the menaged...
2
by: lukegregory | last post by:
Is it possible to open a form from one project from a form in another project within the same solution? If so how is this done? Thanks
3
by: Dave | last post by:
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...
4
by: TS | last post by:
in my web project's bin folder, the dll, that comes from a project reference of a class library in same solution, can't be deleted. it says it has a sharing violation. i also cannot delete the...
1
by: Tim F | last post by:
Problem: I'm receiving the error "File or assembly name XXXXX or one of its dependencies, was not found." when trying to execute code in an assmebly that has both a strong-name and has been...
1
by: Tom | last post by:
My unsigned DLL works in my project that references it as long as I set Copy Local = true. Now I have signed the DLL with the sn.exe generated keys but have not yet moved the DLL into the GAC. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.