简体   繁体   中英

Application root class for ClearCanvas exe

I trying to execute ClearCanvas.Desktop.Executable exe from c# windows application but I am getting an error as "Unable to resolve application root class ClearCanvas.Desktop.Executable - no matches."

below is my code in C# windows application,

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();

There is a problem with the exe's root class name. So what I need to set it as?

Try doing it this way:

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);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM