So I stripped the code down to what doesn't work, which is what follows:
[<EntryPoint>]
let main argv =
let procStart = new ProcessStartInfo(argv.[0], argv.[1..] |> String.concat " ")
procStart.RedirectStandardInput <- true
let proc = Process.Start(argv.[0], argv.[1..] |> String.concat " ")
let y = Console.ReadLine()
0
So I started the program with the command line arguments "fsi". fsi is f# interactive, which is on my path, so I'm assuming the absolute path doesn't matter. The program started fine, then it started the fsi process, which started up and shut down after displaying a red error for a split second. I couldn't read the error that fast, so I print screened to get a picture, so there may be a typo or two, but here is the error:
unknown(1,1): error FSI1223: FSharp.Core.sigdata not found alongside FSharp.Core
unknown(1,1): error FS0229: Error opening binary file 'Path\to\project\bin\debug\FSharp.Core': Exception of type 'Microsoft.FSharp.Compiler.ErrorLogger+StopProcessing was thrown.
There was a little bit more about not being able to read the f#.core assembly.
My theory is this: I can start fsi from a normal cmd window; I'm thinking that when I start fsi from cmd, it looks in the same directory as fsi to find f#.core, but when I start it with Process.Start it looks in the current directory for some reason.
I don't know if I'm right, and I don't know how to fix this even if I am.
ProcessStartInfo.WorkingDirectory. - Fyodor Soikin