Referencing project within solution

  • Thread starter Thread starter Frederick
  • Start date Start date
F

Frederick

I have a VS.NET Solution containing two projects.

I want to add a reference to one of the projects from the
other project (say: reference 2 from 1) i.e. select the
DLL assembly from project 2 and put it as a reference on
project 1.

Quite a simple concept, but my builds are not outputting
DLLs....justs .EXE files (BTW I am not doing any Interop).

Now, I am aware that one assembly can be an EXE or DLL,
but VSNET does not allow me to reference an EXE.

I did a trick and copied the EXE from project 2, renamed
it to DLL and there it was....a reference to a DLL.
But this is just not the way to do it..

Any hints please?

Thanks.
 
If you need two exes, you might put common code in a dll that is referenced
by both exe assemblies.
 
Ok, but that sill does not answer the question:
"How can VS.NET output both a DLL and EXE file?"

Thanks.
 
It can't and you can't bind to exe assembly.
That's why you have to create a third project which you set as a dll.
 
Great I must say that I am reading .NET Remoting from
MSPRESS and as a metter of fact, there lacks a
substantial information on the code examples, and whole
processes are abstracted using two words in some
paragraph.

Naturally the book would be 5000 pages if it was
complete, but minimally complete is a different concept,
and I dont see it there.

Thanks for the reply,
I now have to find out.....which code is common, what to
do with the common bits (redundancy) in each
project....and how to output a dll from the common bits.

Unorthogonal.
 
Thanks for the reply,
I now have to find out.....which code is common, what to
do with the common bits (redundancy) in each
project....and how to output a dll from the common bits.

Well, at least last part is an easy one.
Just set Project/Properties/Output Type to Class Library.
 
Back
Top