我尝试从c#windows应用程序执行ClearCanvas.Desktop.Executable exe但是我收到错误“无法解析应用程序根类ClearCanvas.Desktop.Executable - 没有匹配。”
下面是我在C#windows应用程序中的代码,
string [] args = new string [2]; args [0] =“ClearCanvas.Desktop.Executable”;
Process pro = new Process();
pro.StartInfo.FileName = @"D:\ClearCanvasWorkStation\Desktop\Executable\bin\Debug\ClearCanvas.Desktop.Executable.exe";
pro.StartInfo.Arguments = args[0];
pro.Start();
exe的根类名称存在问题。那么我需要将它设置为什么?
答案 0 :(得分:0)
尝试这样做:
Process pro = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo(@"D:\ClearCanvasWorkStation\Desktop\Executable\bin\Debug\ClearCanvas.Desktop.Executable.exe");
startInfo.Arguments = args[0];
Process.Start(startInfo);