How to call console application from FirstConsolApplication project, in SecondConsolApplication project? Everything is in same solution
static void Main(string[] args)
{
using (Process p = new Process())
{
p.StartInfo = new ProcessStartInfo
{
FileName = @"SecondConsolApplication.exe",
Arguments = "OneArgument",
};
p.EnableRaisingEvents = true;
using (ManualResetEvent mre = new ManualResetEvent(false))
{
p.Exited += (s, e) => mre.Set();
p.Start(); //ERROR IS HERE !
mre.WaitOne();
}
Console.WriteLine(p.StandardOutput.ReadToEnd());
}
}
I get exception:
The system cannot find the file specified