I am developing a Visual Studio plugin. It will automatically generate and run a command line. If I run the command in the shell, it could generate some logs during running.
However, I want to hide the shell window and display the logs in the Visual Studio Output Window. Is there a way to implement this?
Here's my code to run the command:
var process = new System.Diagnostics.Process();
process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
process.StartInfo.FileName = "cmd.exe";
process.StartInfo.Arguments = "/c"+command;
process.Start();
according to this similar question