更新时间:2022-12-06 17:49:15
它在 .NETCore v3.0 或更高版本中开箱即用:
It works out of the box in .NETCore v3.0 or newer:
$ cat hello.fsx
#!/usr/bin/env fsharpi
printfn "hello world"
$ dotnet fsi hello.fsx
hello world
$ dotnet --version
3.0.100
PS:旁注:如果你想编译你的脚本而不必运行它们,检查 这个工具(抱歉,目前仅兼容 Linux/Mac,我们接受 PR 以添加 Windows 支持).
PS: Side-note: if you want to compile your scripts without having to run them, check this tool (only Linux/Mac compatible for now sorry, we accept PRs to add Windows support).