C#C
C#3y ago
AJ

❔ Trying to run a command through C# on macOS

I'm currently utilising Jetbrains rider. My tutor has tasked me with creating a simple little C# transpiler, that will have source code, which works and builds into a CS file, after that it then needs to compile via Mono.

Everything works except trying to get the csc build.cs file working.

void Build()
{
...
    Compile($"csc {buildDir}/build.cs");
}

void Compile(string command)
{
    Process.Start("csc", command);
    Environment.Exit(0);
}
Was this page helpful?