简体   繁体   English

从.NET Core控制台应用程序内部将.NET Framework控制台应用程序启动到新窗口中

[英]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.

相关问题 从 .Net Framework 4.6.1 控制台应用程序转到 Core 2.0 控制台应用程序后出现 Newtonsoft DeserializeObject 错误 - Newtonsoft DeserializeObject error after going from .Net Framework 4.6.1 Console App to Core 2.0 console App 如何将.net框架数据层引用到.net核心控制台应用程序 - How reference .net framework data layer to .net core console app 控制台应用程序和控制台应用程序(.NET Framework)有什么区别? - Whats the difference between Console App and Console App (.NET Framework)? .net core 控制台应用实现持久缓存 - .net core console app implement persistent cache 了解控制台应用程序中的.net Core依赖注入 - Understanding .net Core Dependency Injection in a console app 使 .net 核心控制台应用程序成为单个 .exe - Make .net core console app a single .exe .NET Core 3.1 控制台应用程序无法在 Windows 上运行 7 - .NET Core 3.1 Console App will not run on Windows 7 发布的控制台应用程序上没有.NET Core 2.0应用程序设置 - No .NET Core 2.0 appsettings on a published console app 控制台应用程序中的.Net核心依赖项注入 - .Net Core Dependency Injection in Console App 将 .NET Core 控制台应用程序作为服务运行,还是重做? - Running .NET Core console app as a service, or redo?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM