Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run multiple instances with one click in Visual Studio

I wonder if I can run multiple instances (right now two instances) of my application in debug mode by doing a simple click or set a key for that...

like image 705
MCA Avatar asked Mar 31 '11 11:03

MCA


People also ask

Can you have multiple instances Visual Studio?

Open a second instance of Visual Studio for Mac To open a second instance of the integrated development environment (IDE), right-click on the Visual Studio icon in your dock or Applications folder, and select New Instance.

How do I run the same project twice in Visual Studio?

Build your project once. Add the multiple . exes as "Projects" (right-click folder > Add > Existing Project, then select your exes, one by one) Now you can set up your "Multiple StartUp Projects" to launch all 5 "projects", and debug them at the same time.

How do I open multiple solutions in Visual Studio?

There's a much easier (but not so obvious) way; right click on the Visual Studio icon in the taskbar, then right click on the application name in the popup menu, then click "Open". Windows will then open another instance where you can open another solution in. You can open another instance like any other program.

Can we launch multiple instances?

You can use just one instance type, but it is a best practice to use a few instance types to allow Amazon EC2 Auto Scaling to launch another instance type in the event that there is insufficient instance capacity in your chosen Availability Zones.


1 Answers

Not many people seem to know this, but this is perfectly possible, though I admit it's not very obvious. Here's what you do:

  • suppose your current project is A, and it's output is c:\bin\my.exe
  • add an empty project to the solution for A, call it 'Dummy'
  • under Dummy's Project Properties->Debugging set the Command to point c:\bin\my.exe
  • under Solution Properties->Configuration Manager, uncheck all builds of the Dummy project so VS won't try to build it (building an empty project fails)
  • under Solution Properties->Startup Project, select Multiple Startup Projects and set the Action for both A and Dummy to Start
  • now hit F5 and your exe will be launched twice, each under a seperate debugging instance. (as you will be able to see in the Debug->View->Processes window)
like image 186
stijn Avatar answered Oct 01 '22 03:10

stijn