Ionide-vscode-fsharp: Can't start FSI

Created on 16 Oct 2018  路  10Comments  路  Source: ionide/ionide-vscode-fsharp

For the last few days my VSCode stopped starting the FSI. It was good before.
When using command (Ctrl-P) and ">FSI:Start" I get the following message:
"connect ECONNREFUSED 127.0.0.1:8119"

If I try to mark instructions and send to FSI (for the first time) using Alt-Enter I get the following:
"Failed to send text to FSI"
"Failed to spawn FSI, please ensure it's in PATH"

I tried to reinstall everything including VSCode and Ionide without sucess.

reproduction needed

Most helpful comment

Got the same issue on my Ubuntu
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial

I finally fixed it, but I'm not sure if what I did fixed it or not.

Anywyas, here is what I did:

  1. in cmd, type which fsharpi to get the fsi path
  2. in VS Code, go to File > Preferences > Settings > Extensions > Fsharp configruation
  3. Fsharp:Fsi File Path and enter the result you got with which fsharpi
  4. uninstall ionide-fsharp from VS Code extension > reload > reinstall

But this solution fixed the execution of the script but error syntax highlighting and code lens is not working.

All 10 comments

I have exactly the same problem on my Surface Book; it started after I installed the October Windows 10 update and a firmware update. I've tried uninstalling and reinstalling VSCode and Ionide several times, but nothing seemed to work. Also put FSI in the PATH, verified it worked using a DOS box, but VSCode/Ionide still can't find it.

Oh, one other thing. It all works fine on my Surface Pro 2017, even after the October updates.

It stopped working for me as well after updating VSCode (October updates)

I have the same problem on Ubuntu

Don't know whether my problem is related to above comments. But it happens to me too by switching Fsac Runtime to netcore on windows (as newly suggested from ionide).
I get following popup:

Failed to start language services. Please check if Microsoft Build Tools 2013 are installed

The suggested MSBuild version is a little obsolete. 馃槃

My investigations so far:
output from F# Language Service (server):

Running: Aktive Codepage: 65001. C:Usersusername.vscodeextensionsionide.ionide-fsharp-3.28.0/bin_netcore/fsautocomplete.dll --mode http --port 8277 --hostPID=14664
spawn Aktive Codepage: 65001. ENOENT

tried to execute the command in cmd:
> .\fsautocomplete.dll --mode http --port 8277 --hostPID=14664

Unbehandelte Ausnahme: System.IO.FileNotFoundException: Die Datei oder Assembly "System.Runtime, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" oder eine Abh盲ngigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.

googled for not found System.Runtime. Here someone suggests to execute a dll with dotnet command.
This worked for me finally in cmd:

> dotnet ./fsautocomplete.dll --mode http --port 8277 --hostPID=14664

[11:52:35 INF] tracking host PID 14664
[11:52:35 INF] Smooth! Suave listener started in 341,166ms with binding 127.0.0.1:8277

Should be probably also an easy fix in ionide then if dotnet is in path.

Windows 10
dotnet 2.1.403
ionide 3.28.0

Got the same issue on my Ubuntu
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial

I finally fixed it, but I'm not sure if what I did fixed it or not.

Anywyas, here is what I did:

  1. in cmd, type which fsharpi to get the fsi path
  2. in VS Code, go to File > Preferences > Settings > Extensions > Fsharp configruation
  3. Fsharp:Fsi File Path and enter the result you got with which fsharpi
  4. uninstall ionide-fsharp from VS Code extension > reload > reinstall

But this solution fixed the execution of the script but error syntax highlighting and code lens is not working.

I don't know if this will help or not. On my Surface Book running Windows 10, when I set the path for fsi in the preferences, when I try to run an F# script through the interpreter I get the following error message:

The terminal process command '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsi.exe" --fsi-server-input-codepage:65001' failed to launch (exit code: 2)

Any thoughts, anyone? Thanks.

OK. A little progress. I had thought the fsi path needed to be in JSON format. When I don't put the path in quotes and use single backslashes, I can get the interpreter to run. However, while I have auto complete, I don't have Intellisense. Any suggestions?

I installed .NET Core SDK. It is working now.

After the latest VSCode update, Ionide now seems to be working properly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cloudRoutine picture cloudRoutine  路  5Comments

landy picture landy  路  5Comments

alfonsogarciacaro picture alfonsogarciacaro  路  5Comments

MangelMaxime picture MangelMaxime  路  4Comments

bruno-cadorette picture bruno-cadorette  路  4Comments