【发布时间】:2016-09-05 10:11:43
【问题描述】:
我无法在 Windows 或 dotnetcore 上的 linux 中运行 find/run fsi.exe。它无处可寻。可能还不支持?
【问题讨论】:
-
您是否找到了将 F# REPL 与 .NET Core 结合使用的方法?
标签: .net linux f# .net-core f#-interactive
我无法在 Windows 或 dotnetcore 上的 linux 中运行 find/run fsi.exe。它无处可寻。可能还不支持?
【问题讨论】:
标签: .net linux f# .net-core f#-interactive
F# for CoreCLR Status 说 CoreCLR 上的 FSI 是完整的,所以如果能找到它大概会起作用。
在另一张罚单中 — Why were the C# and F# REPLs removed and when/how will it implemented "as a separate tool"? — 声称 dotnet repl fsi 曾经可以工作,但已被删除以支持(尚不存在的)单独的包。
【讨论】:
如果我错了,请纠正我,但是,今天(19 年 12 月)
f# 与 netcore 交互在 Ubuntu 18.04 中运行
带有来自
https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-1904
的标准安装说明
和https://fsharp.org/use/linux/
// file: runtime.fsx
open System
open System.Reflection
open System.Runtime
open System.Linq
Type.GetType("Mono.Runtime")
|> printf "Mono.Runtime: %A\n"
(Assembly.GetEntryAssembly().GetCustomAttributesData()
.FirstOrDefault((fun a ->
a.AttributeType = typedefof<Versioning.TargetFrameworkAttribute>)))
.ConstructorArguments
|> printf "Framework: %A\n"
$ fsi runtime.fsx
Mono.Runtime: Mono.Runtime
Framework: seq [".NETFramework,Version=v4.6"]
...
$ dotnet fsi runtime.fsx
Mono.Runtime: <null>
Framework: seq [".NETCoreApp,Version=v2.1"]
【讨论】: