c++visual-studio-2008configurationsolutionvcproj

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


Solution

  • 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.