[英]Launch .NET Framework console app into a new window from inside a .NET Core Console app
I have a .NET Core console app (a TCP client) that needs to launch a .NET Framework console app (a TCP Server). 我有一个.NET Core控制台应用程序(一个TCP客户端),需要启动一个.NET Framework控制台应用程序(一个TCP服务器)。 I'm using
System.Diagnostics.Process.Start(server);
我正在使用
System.Diagnostics.Process.Start(server);
and it starts, but both console apps are in the same window. 并且启动,但是两个控制台应用程序都在同一窗口中。 How can I get the server to run in a separate window?
如何使服务器在单独的窗口中运行?
If you set the process properties as follows. 如果按如下方式设置过程属性。 You will get it in a new window.
您将在新窗口中获取它。
ProcessStartInfo p = new ProcessStartInfo(fileName, arg);
p.UseShellExecute=true;
Process processChild = Process.Start(p); // separate window;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.