我有一个愚蠢的问题要问。我刚开始学习 F#,正在尝试编译一些基础示例(例如 HelloWorld.fs)。
我创建了一个简单的 F# 文件,其路径为:C:\FSharp\HelloWorld.fs
。
为了编译它,我使用了 F# 编译器的完整路径,如下所示:
C:\FSharp>"C:\Program Files\Microsoft F#\v4.0\fsc.exe"HelloWorld.fs
它工作得很好。
但是,我不想一直写编译器的完整路径:C:\Program Files\Microsoft F#\v4.0\fsc.exe
。我试图将它添加到 Windows 路径,但我一直收到错误 fsc is not recognized as internal or external command
。
如何为 F# 编译器创建一个快捷方式,这样我就不必在每次需要编译程序时都使用完整路径?
最佳答案
对于那些在 2019 年到达这里并收到 F# 作为 Visual Studio 2017 组件的人。F# 编译器的位置如下:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe
Take careful note of the Version Type (
Community
in this case) and adjust yours accordingly.
关于windows - 如何为 F# 编译器 (Fsc.exe) 创建快捷方式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15147930/