1

I'm trying to run a process from C# console app on Mac:

var processInfo = new ProcessStartInfo("./gradlew", "bundleRelease")
{
    WorkingDirectory = gradlewDir,
    CreateNoWindow = true,
    UseShellExecute = false,
    RedirectStandardError = true,
    RedirectStandardOutput = true
};

var process = Process.Start(processInfo);

It fails with "no such file or directory" error. However if I run:

var files = Directory.GetFiles(gradlewDir); I do see this file in there. I also made sure all permissions are set to run it. I'm able to run it from the terminal too. What am I doing wrong?

Andrei
  • 42,814
  • 35
  • 154
  • 218

0 Answers0