I consider System.Diagnostics.Process.Start (..), which is located in System.Diagnostics.Process, the nuget package can take the type ProcessStartInfo as one of the overloads. This type has the following properties, if set to true, will redirect logs to the thread in the Process Type, which is returned by System.Diagnostics.Process
var proc = System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo() { RedirectStandardOutput = true, RedirectStandardInput = true, RedirectStandardError = true } ); proc.StandardError
Shameless plugin, I also made a package that easily abstracts the opening of things on mac / win / linux, basically abstracting xdg-open (ubuntu), open (mac), cmd.exe (win), so you don't need to think about it
https://github.com/TerribleDev/Opener.Net
source share