0

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?

1 Answers1

0

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);
James
  • 80,725
  • 18
  • 167
  • 237