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

2

12

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

Imagine answered 14/10, 2009 at 0:34 Comment(1)
I had to do this last year as well for networking, annoying as hell.Illbehaved
S
20

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.

Sande answered 14/10, 2009 at 0:36 Comment(2)
It's "Multiple startup projects" radio-button. Order of execution can also be specified there.Wrennie
Yes; I've expanded my answer.Sande
O
0

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.

Overalls answered 14/10, 2009 at 6:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.