将其添加
UseShellExecute到我的StartInfo并将其设置为
false起作用:
var process = new Process{ StartInfo = { FileName = "dotnet", Arguments = "run", UseShellExecute = false, WorkingDirectory = applicationPath }};process.Start();的默认
UseShellExecute值为true,但与运行类似,
cmd dotnet run而不是
dotnet run我所需要的。



