I came across this question after several searches online. But none of them seemed to answer perfectly. If there is any good reference that someone can lead me to that is also very good. Thanks in advance.
I have two console applications running in dotnet core 2.2. The console applications are basically chatting clients, using NATS Server. One being the publisher and the other consumer, I am using both projects as startup projects in the solution. Both of the projects are connecting to NATS server initially, so the NATS server needs to be executed prior to my publisher or consumer.
The command to run the NATS server is
nats-server --user DemoUser
The NATS server is an executable file, I want to my consumer/publisher to execute the command somehow to run the nats-server.
You can run command in another process like below :