3

I installed the Ionide-fsharp (1.9.1) package in VSCode (1.2.1) and started writing some example scripts from fsharpforfunandprofit.com. I expected to have autocomplete in the VSCode editor, but it does not seem to work: Edit F# code in VSCode

I also set the System's PATH variable to point to "C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0" as described on the Ionide web site: My System Environment Variables - PATH

Am I missing something, or autocomplete is not possible in VSCode when editing F# scripts?

9
  • Nope, still not working... Commented Jul 5, 2016 at 13:59
  • Sorry, I missed out the set before the rest of the command. set PATH=%PATH%;C:\Program Files(x86)\Microsoft SDKs\F#\Framework\v4.0 Commented Jul 5, 2016 at 14:00
  • Still not working even after adding the path to the fsc.exe and fsi.exe explicitly to the PATH variable as suggested. Closed and started VSCode from the same command window after altering the PATH (using the command "code ."). Sending code to F# Interactive works fine in VSCode, but I can't get autocompletion to work... Commented Jul 5, 2016 at 14:05
  • You could try a reboot although I'm not sure that would do any more. I remember having a problem like this a while back but updating the environment variable manually solved it. Commented Jul 5, 2016 at 14:09
  • I usually open a VS developer command prompt, then type code . and everything works fine, so long as I can do fsi before opening vscode it works. Commented Jul 5, 2016 at 14:13

2 Answers 2

2

Another possible fix is installing Microsoft Build Tools 2013 .

Sign up to request clarification or add additional context in comments.

3 Comments

So this means that Inode for Atom and Visual Studio Code works only with F# Version 3.1? Visual Studio 2015 runs with 4.0, as far as I can tell.
Ionide works with F# 4.0. But for some configurations installing Microsoft Build Tools 2013 is required... which is also installed by F# 3.1 standalone installer (so installing it accidentally, fix problem)
Thank's @krzysztof-cieslak for clarification.
1

I wanted to open an issue on the Ionide Github page, but I found the following issue Autocomplete does not work in v1.2.1 #30 which pointed me to the suggested way of installing F# Tools. After installing the F# Tools, following the link in that issue, I now can autocomplete F# script code in VSCode. I had F# already installed by VS2015 Community Edition so I was skeptical at the beginning. Now, after installing F# Tools from the link in the issue, I have 2 F# versions under C:\Program Files (x86)\Microsoft SDKs\F#:

  • 3.1
  • 4.0

Visual Studio 2015 installed the 4.0 Version. The version 3.1 came with this last installation of the F# Tools. I also get autocomplete now in Atom for F# code.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.