I'm completely new to dotnet and vscode so I might be missing something trivial. I just want to get F# running in VSCode on my Mac. I first tried installing dotnet from brew:
brew cask install dotnet-sdk
This seems to be working fine from the command line since I could do both dotnet new
and dotnet build
:
dotnet new console -lang F# -o myproj
Now I installed Visual Studio Code, also from brew:
brew cask install visual-studio-code
I then installed the Ionide-fsharp plugin, opened the myproj
folder from vscode and restarted it. I'm then greeted with:
I then searched for FSharp.dotnetRoot
in the settings and tried to configure this:
But it didn't help (I also tried setting the folder to /usr/local/share/dotnet
and /usr/local/share/dotnet/sdk/3.1.100
but nothing worked).
So I completely uninstalled everything (including wiping my ~/.vscode
folder) from brew and re-installed everything from the official Microsoft documentation. In the docs it says that the F# support should be built-in to vscode on macosx, but it still recommended me to install Ionide-fsharp when I opened the folder again, so I obeyed. But I just ran into exactly the same problem again.
So my question is: How can I install vscode with working F# support on MacOSX?
Here's my output from vscode "about":
Version: 1.41.0
Commit: 9579eda04fdb3a9bba2750f15193e5fafe16b959
Date: 2019-12-11T17:58:38.338Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 19.2.0
and this is from dotnet --info
:
.NET Core SDK (reflecting any global.json):
Version: 3.1.100
Commit: cd82f021f4
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.15
OS Platform: Darwin
RID: osx.10.15-x64
Base Path: /usr/local/share/dotnet/sdk/3.1.100/
Host (useful for support):
Version: 3.1.0
Commit: 65f04fb6db
.NET Core SDKs installed:
3.1.100 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
sudo nano /etc/paths
(3) Create symlink withln -s /usr/local/share/dotnet/dotnet /usr/local/bin/
(you may need to modify the paths slightly for your case). – Uhl