gpt4 book ai didi

.net - 在 Mac 上从命令行运行 Dotnet F Sharp 编译器

转载 作者:行者123 更新时间:2023-12-04 10:43:45 24 4
gpt4 key购买 nike

我正在经历这个tutorial但没有 fsc(F Sharp 编译器)。运行dotnet fsc -a MyAssembly.fs 显示:

Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET Core program, but dotnet-fsc does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

运行 ls/usr/local/share/dotnet/sdk/3.0.100/FSharp 显示:

FSharp.Build.dll                          fsc.exe
FSharp.Compiler.Interactive.Settings.dll fsc.runtimeconfig.json
FSharp.Compiler.Private.dll fsi.deps.json
FSharp.Core.dll fsi.exe
Microsoft.FSharp.NetSdk.props fsi.runtimeconfig.json
Microsoft.FSharp.NetSdk.targets it
Microsoft.FSharp.Overrides.NetSdk.targets ja
Microsoft.FSharp.Targets ko
Microsoft.Portable.FSharp.Targets pl
cs pt-BR
de ru
default.win32manifest tr
es zh-Hans
fr zh-Hant
fsc.deps.json

其中有 fsi.exefsc.exe。我相信这意味着 dotnet fsc 将会存在。

此外,我从这个 guide 得到了单声道所以 fsharpcfsharpi 工作。

最佳答案

指南有点老了。这Stack Overflow question讨论我们通常不直接使用fsc.exe而是创建一个项目并使用 .NET Core CLI ( dotnet ) 来构建和运行 F# 项目。 using the .NET Core SDK 有入门指南这应该可以帮助你。

关于dotnet fsc的使用有一个discussion thread关于它在 GitHub 上。据我所知fsc关键字是 - 与所讨论的事情相反 - 未实现。 fsi关键字是,虽然。您仍然可以使用 fsc.exe直接地。只需调用 dotnet <full-path-to-fsharp-sdk-location>/fsc.exe .如上所述 - 通常不需要调用 fsc除了非常特殊的任务或诚实的好奇心之外。

关于.net - 在 Mac 上从命令行运行 Dotnet F Sharp 编译器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59814243/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com