ionide-vscode-fsharp icon indicating copy to clipboard operation
ionide-vscode-fsharp copied to clipboard

IntelliSense AutoComplete not working in .fsx file when opening System namespace (WSL)

Open malbertife opened this issue 4 years ago • 3 comments

Problem

Possibly the same issue as #1275

On WSL Debian, IntelliSense shows this error message instead of Autocomplete choices:

immagine

If open System is removed, autocomplete works as expected. If open System is replaced by open System.IO, the type reported unavailable is IOutputStream instead.

Steps to reproduce

  1. Create new directory and cd into it.
  2. dotnet new console -lang "F#"
  3. code .
  4. Create file Script.fsx in project folder and open it in VSCode.
  5. Type this into the file:
open System.IO

type Person = {
    name: string;
}

let f (p: Person) =
    p.

Machine infos

  • Operating system: Linux
  • Arch: x64
  • VSCode: 1.41.1
  • Runtime: netcore
  • Dotnet version: 3.1.101
  • Runtime: .Net
  • Mono version:
Mono JIT compiler version 6.8.0.96 (tarball Wed Jan 15 10:20:48 UTC 2020)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	Interpreter:   yes
	LLVM:          yes(610)
	Suspend:       hybrid
	GC:            sgen (concurrent by default)
  • MSBuild version:
Microsoft (R) Build Engine version 16.5.0-ci for Mono
Copyright (C) Microsoft Corporation. All rights reserved.

Possibly relevant options:

  • FSharp: Use Sdk Scripts is true
  • FSharp: Dot Net Root is /usr/share/dotnet/ (if either value is changed IntelliSense does not work at all in .fsx files)

malbertife avatar Feb 02 '20 10:02 malbertife

Hey @malbertife :wave:,

Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our OpenCollective and consider backing us.

https://opencollective.com/ionide

PS.: We offer backer support for all backers. Don't forget to add backer label when you start backing us :smile:

Hello, I found a hackaround (works for me with ionide + linux + .fsx script):

[<AutoOpen>] module x = open System.IO

ghost avatar Jun 03 '20 01:06 ghost

I am having the same issue using net5.0 on a MacOS. Code Lenses don't work either.

ryepesg avatar Feb 18 '21 10:02 ryepesg