Under my solution I have 2 projects Project A console application , Project B Winforms Window.
How I can From Project B to start new process with console application from Project A ?
I tried to making it via
Process note = new Process();
note.StartInfo.FileName = "note.exe";
note.StartInfo.Arguments = "123";
note.Start();
But in that way i cant debug both processes from one vs instance . Any idea ?
Thanks
If the only reason that you want to start the two projects is that you want to be able to debug both of them you can also configure your solution to have multiple startup projects:
If you are going to start the other project as a separate project anyway, you could use
to attach to the newly started process. Then you will also be able to debug both processes in Visual Studio. Attaching the debugger can also be achieved programmatically. In project A you can add the following code to the
Mainmethod:In the dialog that will then pop up you can select the already running instance of Visual Studio.