[英]How to start a .Net Core 3.1 process from a .Net Core 3.1 process?
I am trying to start a child.Net Core 3.1 process from another.Net Core 3.1 process for anonymous pipe communication.我正在尝试从另一个.Net Core 3.1 进程启动一个 child.Net Core 3.1 进程以进行匿名 pipe 通信。
_childProcess = new Process();
_childProcess.StartInfo.FileName = "childProcess.exe";
_childProcess.StartInfo.UseShellExecute = false;
_childProcess.StartInfo.WorkingDirectory = AppDomain.CurrentDomain?.BaseDirectory;
_childProcess.Start();
results in the error when debugging: "To run this application, you must install.Net Core".调试时导致错误:“要运行此应用程序,您必须安装.Net Core”。
The child process project is a dependency of the parent project which results in the childProcess.exe
being copied into the output directory of the parent process.子进程项目是父项目的依赖项,导致
childProcess.exe
被复制到父进程的output目录中。 childProcess.exe
can be started directly with no problem. childProcess.exe
可以直接启动没有问题。 When started from code the runtime cannot be found.从代码启动时,无法找到运行时。
Make sure the child.runtimeconfig.json' is in the same directory as the
client.exe`.确保
child.runtimeconfig.json' is in the same directory as the
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.