C# 在c中的窗口窗体中打开我的代码的CLI版本#

C# 在c中的窗口窗体中打开我的代码的CLI版本#,c#,visual-studio,winforms,C#,Visual Studio,Winforms,我已经用windows窗体和c#中的普通类程序制作了一个跳棋游戏,我可以通过更改设置为启动项目的选项在它们之间进行更改,但我想知道是否可以在windows窗体运行时打开我在普通类程序中制作的跳棋游戏的CLI版本。如果可能的话,我可以看看怎么做吗 谢谢。您可以使用Process.Start启动CLI版本: var processStartInfo = new ProcessStartInfo(); processStartInfo.WorkingDirectory = // the path to

我已经用windows窗体和c#中的普通类程序制作了一个跳棋游戏,我可以通过更改设置为启动项目的选项在它们之间进行更改,但我想知道是否可以在windows窗体运行时打开我在普通类程序中制作的跳棋游戏的CLI版本。如果可能的话,我可以看看怎么做吗


谢谢。

您可以使用
Process.Start
启动CLI版本:

var processStartInfo = new ProcessStartInfo();
processStartInfo.WorkingDirectory = // the path to the bin\Debug folder where your executable exists
processStartInfo.FileName = // the name of your executable (including .exe)
Process.Start(processStartInfo);

var processStartInfo=new processStartInfo();processStartInfo.WorkingDirectory@“C:\Users\username'\source\repos\Computing-Project\Computing Project\bin\Debug”;processStartInfo.FileName=@“C:\Users\username\source\repos\Computing-Project\Computing Project\bin\Debug\Computing Project.exe”;Process.Start(processStartInfo)这是我在代码中写下的内容,但它似乎不起作用,并返回错误“系统无法找到指定文件”。我怎么解决这个问题呢?不管怎样,我发现这是第一次计算和项目之间的空间。