[VSCODE] Error The terminal process terminated with exit code: 1
Did you install Visual Studio Code + Ionide-fsharp and can't execute code? Do you get a terminal error that does not help you further? You might need to add FSI.EXE to the path.
What did I do to get this error?
My machine already had Visual Studio 2017 RC with F# installed. FSharp Interactive (FSI.EXE) was installed here:
c:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0\fsi.exe
- I Used Chocolatey to install Visual Studio Code
choco install visualstudiocode
- I started Visual Studio Code
- I used the Command Palette (CTRL + P) to find the Ionide extension
ext install Ionide
- I installed Ionide-fsharp.
- I typed some code and got this error:
The terminal process terminated with exit code: 1
FSI.EXE need to be in the system path. To check if that is the case, open a Command Prompt and type
FSI. If it gives an error, you need to add the path to FSI to the system variables like this:
- Open Environment Variables
- Click the button: Environment Variables
- Select System Variables, PATH
- Click Edit
- Add the following path:
c:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0\
(*) Or wherever your copy of FSI.EXE is
- Restart Visual Studio Code
- Execute the code again and voila!