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…

  • Lodra@programming.devM
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    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

      • Lodra@programming.devM
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        1 year ago

        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.devOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          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.devM
            link
            fedilink
            English
            arrow-up
            2
            ·
            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.devOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      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.