I would like to simultaneously start multiple instances of a project using Visual Studio. By pressing F5 (Debug -> Start Debugging), at most开发者_Python百科 1 instance of each project in the solution starts, respectively. I didn't find a way to configure startup of multiple instances of the same project.
The project in question is a console app that is difficult to convert in a way to enable multiple instances within the project.
Well, if you are looking for simultaneously, I don't know.
But you can try right Click on the Project Debug -> Start new instance as many times as you like.
If you don't need to debug you can start multiples instances ("Start Without Debugging")
In case you want to debug an instance you could then attach the debugger to it. If attaching the debugger is not an option you could use System.Diagnostics.Debugger.Break() method in your code. The equivalent but programmatically.
It's not possible to debug multiple instances of a project using a single project. The IDE/debugger need to synchronize program execution with source code and debugging symbols; it can't do that unless there's only one instance.
You could, however, copy your project multiple times and start them as you describe (as a solution).
Select and Right click any project. Then debug and Start New Instance
精彩评论