That should really go to John Palmer ... the spinach from his link basically just works
[<EntryPoint>]
let main argv =
printfn "%A" argv
let scs = SimpleSourceCodeServices();
let fn = Path.GetTempFileName();
let fn2 = Path.ChangeExtension(fn, ".fs");
let fn3 = Path.ChangeExtension(fn, ".dll");
File.WriteAllText(fn2, """
module File1
let seven =
3 + 4
""");
let errors1, exitCode1 = scs.Compile([| "fsc.exe"; "-o"; fn3; "-a"; fn2 |])
let ex = File.Exists(fn3)
printfn "File %s exists: %b" fn3 ex
I have to admit that it would be great to see the non fsc.exe option: D
source
share