Reputation: 542
This question ...and the answer shows how to start another instance of a console app in Visual Studio when you already have one running.
I want to do the same BUT passing different args[]
. For example, when debugging I want to start up 2 instances of MyConsoleApp.exe
as follows...
"MyConsoleApp.exe Agent1"
"MyConsoleApp.exe Agent2"
Does anyone know how to do this?
(Using Visual Studio 2015 Pro)
Upvotes: 4
Views: 3486
Reputation: 4619
As far as I know you can't. What I'd do is open the solution in two VS instances and run it. Or else you can give it a go the following way too ( haven't tried this but ideally it should work)
Create two console projects and add all your files as 'linked' files on both projects ( the same .cs files being used on both projects)
Go to the solution and set one project as 'Start with Debugging' and other as start without debugging. ( or may be both as Start with Debugging- depending on your scenario) here is how you could do this.
Upvotes: 1