F#: Path error when trying to run simple F# program on VS Code

185 Views Asked by At

I just installed Visual Studio Code on a different laptop and then proceeded to get the Ionide-fsharp extension. I then tried to run this simple piece of code:

open System

let rec factorial n =
    if n = 0
    then 1
    else n * factorial (n - 1)

factorial 5

But then I get this error and I can't seem to fix it:

 open: the term 'open' is not recognized as the name of a cmdlet,
 function, script file, or operable program. Check the spelling on the name, 
 of if a path was included, verify that the path is correct and try again.

It then proceeds to throw a bunch more nonsense at me and repeats the error above for every single line of code I have written afterwards. Please help.

0

There are 0 best solutions below