VS2008: how to run two separate projects from the same solution

I have a single un-managed C++ console-app solution (.sln) with two projects (.vcproj) both are built as .exe. I want to run them both at the same time (one is a client and one is a server). How do I configure my Visual Studio such that when I hit a single button, say F5, it would be smart enough to run one after another, in the order that I specify?

Currently what I have to do is set one project to be a "Startup project" then hit "Ctrl+F5" to run one, then I have to change the "Startup project" to be the other one, then hit "Ctrl+F5".

Indeed, doing this 25 times a day is painful. =p

14.10.2009 00:34:17
I had to do this last year as well for networking, annoying as hell.
GManNickG 14.10.2009 00:35:23
2 ОТВЕТА
РЕШЕНИЕ

Right-click on the solution in Solution Explorer, click Properties (If the window is blank, select the solution again), and go to the Startup Projects section under Common Properties. Select the Multiple Startup Projects option. Then, you can specify which project(s) to launch and whether each one should have the debugger attached. You can use the up and down arrows to change the launch order.

18
14.10.2009 00:46:54
It's "Multiple startup projects" radio-button. Order of execution can also be specified there.
Virne 14.10.2009 00:44:07
Yes; I've expanded my answer.
SLaks 14.10.2009 00:47:48

You could create a batch file that launches your two programs (possibly with a pause to let one start-up before the other comes in), and create a project yhat would launch this batch file when you press Ctrl-F5.

You would not have to change the active project any more, and you'd have full flexibility.

0
14.10.2009 06:34:27