Two projects, one solution...how to run the second one?

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

Hello -

Ive got a single "Solution" with two projects. While working with
Project2, when I hit F5 to run and debug, the main form from Project1
loads. What is up with this? I thought that while in the same
solution, the two projects are completely seperate. Obviously not.
Can someone explain what is happening here? And how to I configure it
so that Project2's main form loads when I F5.

Many thanks!

Brian
 
A solution needs to have a single entry point... It can't start two separate
debuggers on two separate projects, at least within the same editor. If you
opened it in 2 separate editors you could do it, but that would just be
dumb.

Usually, when you have multiple projects, you have your main project which
calls functionality within the other projects.
 
Brian,
In addition to CJ's comments you can set which project is the startup
project for the solution.

Right click the project in Solution Explorer and select 'Set as Startup
Project'.

Normally I have a single executable (.exe) in a solution put will have
multiple class libraries.

A solution is just that a complete solution in that it contains all the
projects to solve a problem. So the projects are normally interrelated, such
as a common executable plus all of its class libraries that the executable
needs.

Hope this helps
Jay
 
Right-click on the project that you want to start running when you press F5,
and select "Set as Startup Project".

Tom Dacon
 
Back
Top