this post was submitted on 12 Sep 2023
5 points (100.0% liked)

VS Code

4 readers
1 users here now

founded 1 year ago
MODERATORS
 

Hi everyone, I'm trying to try out F# via FSI in VS Code (Windows 10)

I have Ionide for F# installed, and have used it before, but now every time I try to start it I get a message "FSI :Start resulted in an error", it goes on to helpfully report "the option has no value".

dotnet is in path, dotnet works great. FSI? nothing.

I also have the .net workload installed for visual studio 2022 (if that matters).

I started up my Linux VM (KDE Neon) fired up vs codium and tried FSI Start...same error! So no tinkering in f# for me tonight. Does anyone have an idea what's happening, across two environments? Google is no help...

top 6 comments
sorted by: hot top controversial new old
[–] Lodra@programming.dev 2 points 1 year ago (2 children)

Which terminal are you running in vscode? I think the default is powershell but I'm not sure

Whatever it is, try running that terminal outside of vscode and executing the FSI command. Do you see the same error?

If not, then the problem is with vscode and the embedded terminal.

If yes, then it's something else. You could try running FSI in other terminals like cmd.exe

[–] DrDeadCrash@programming.dev 2 points 1 year ago (1 children)

dotnet fsi

that works, was there a breaking change or is my vscode setup borked?

[–] Lodra@programming.dev 1 points 1 year ago* (last edited 1 year ago) (1 children)

Cool. Where does this succeed and where does it fail?

E.g. Works in powershell outside of vscode but fails in vscode's embedded powershell

Edit: Also, how do you trigger the original error? Are you clicking in vscode's UI? Using the command pallette? Using the embedded terminal?

[–] DrDeadCrash@programming.dev 2 points 1 year ago (1 children)

Hi, thank you for responding, sorry for my incomplete reply.

After running dotnet fsi on the command line, I tried in vs code again. FSI Start...and it worked!

So I don't know if it need a "first run" or something changed between last night and now....but oh well. Thank you for your help!

[–] Lodra@programming.dev 2 points 1 year ago

Oh awesome. Glad that worked for you!

Sounds like some kind of initial processing needs to run outside of vscode before it works normally. Might be worth reporting on github!

[–] DrDeadCrash@programming.dev 1 points 1 year ago

It says it's not in the path, and indeed...poking around the sdk 7 folder I don't see FSI.exe, I see FSI.dll but of course you can't run a dll by name alone.