Two Projects under one Solution?

R

Raterus

Hi,

I've got a Visual Studio solution that contains two projects, P1 is my main application, P2 is a project that contains custom server controls I've created. I would like to have these Projects set up in Visual studio so if I make a change to P2 and recompile, P1 will automatically be updated to use the new assembly.

Here is what I've tried:
I can add a reference in P1 to P2's dll, but that appears to copy the dll to P1's bin directory, and it will never be updated upon a rebuild. I've tried setting the "Project Dependencies" of P1 to depend on P2, but without the reference set, I'll get compile errors that it can't find P2 objects. Also in P1 project properties, under common properties, the "reference path" has both projects bin directories.

Am I missing something here? What must I do to get two projects to compile together under one solution?

--Michael
 
C

Curt_C [MVP]

how did you set the reference? By project, to the dll directly?

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com


Hi,

I've got a Visual Studio solution that contains two projects, P1 is my main
application, P2 is a project that contains custom server controls I've
created. I would like to have these Projects set up in Visual studio so if
I make a change to P2 and recompile, P1 will automatically be updated to use
the new assembly.

Here is what I've tried:
I can add a reference in P1 to P2's dll, but that appears to copy the dll to
P1's bin directory, and it will never be updated upon a rebuild. I've tried
setting the "Project Dependencies" of P1 to depend on P2, but without the
reference set, I'll get compile errors that it can't find P2 objects. Also
in P1 project properties, under common properties, the "reference path" has
both projects bin directories.

Am I missing something here? What must I do to get two projects to compile
together under one solution?

--Michael
 
R

Raterus

That's all you needed to say :) I realized immediately that I was browsing to the dll, not clicking the project tab and selecting it there. Works great now, thanks!

Any "down to earth" help out there, besides what Microsoft puts out, that goes in detail about larger solutions like this? My ultimate goal is to ensure I don't have the exact same source files in two different projects, requiring me to make changes more than once.

Thanks again,
--Michael
 
R

Rick Spiewak

You can extrapolate what you just did to larger solutions. For example, a
current solution has 4 projects. One is just to hold the business objects.
To make cross-referencing easier, consider setting the root namespaces of
the related projects to be the same. Remember that namespace names are
case-sensitive (even for us VB types <g>).

I worked with a group on a solution with 26 projects! It was fine.

That's all you needed to say :) I realized immediately that I was browsing
to the dll, not clicking the project tab and selecting it there. Works
great now, thanks!

Any "down to earth" help out there, besides what Microsoft puts out, that
goes in detail about larger solutions like this? My ultimate goal is to
ensure I don't have the exact same source files in two different projects,
requiring me to make changes more than once.

Thanks again,
--Michael
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top