ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
849 stars 276 forks source link

Extension Not Activating When Using .NET 6 #1971

Open han-tyumi opened 6 months ago

han-tyumi commented 6 months ago

Describe the bug

When I try to use the .NET 6 SDK, the Ionide extension does not activate. Once I switch to .NET 7 or 8, it activates.

Steps to reproduce

Use https://devenv.sh/ to manage environment.

# devenv.nix

{ pkgs, ... }:

{
  languages.dotnet = {
    enable = true;
    package = pkgs.dotnetCorePackages.sdk_6_0;
  };
}

Can also manually create a Nix environment with pkgs.dotnetCorePackages.sdk_6_0 being used.

Link to sample reproduction

TODO

Expected behaviour

I expected the extension to activate when using .NET 6.

Screenshots

image

Ionide Output

As you can see, things seem to look good, but unlike with .NET 7 & 8, I do not get a [16:00:32 DEBUG] [Main] Activating features message logged after this.

Machine info

Additional context

TODO

pseudoramble commented 5 months ago

Just wanted to add that I was also experiencing the same issue, only on Linux instead of macOS. Swapping out .NET 6 for .NET 7, and then uninstalling/reinstalling the extension resolved the issue for me.

That happens to work in my situation so that's good. But is .NET 6 not supported anymore?

MangelMaxime commented 5 months ago

Quoting @baronfel https://github.com/ionide/ionide-vscode-fsharp/issues/1961#issuecomment-1893616101

Not supporting 6 is a bug, we'll take a look.

sora-tech commented 5 months ago

This is also happening for me (VSCode 1.85.2, .net 6.0.126, ionide 7.17.0, linux), the extension never initiates. Previously the extension was taking some time (upwards of a minute) to open in large projects but now doesn't start at all. The F# explorer doesn't show either.

I can recreate on a separate machine (VSCode 1.85.2, .net 6.0.126, ionide 7.17, windows 10) with a fresh install of everything. Upgrading to .net 6.0.418 doesn't affect the issue.

It's also blocking any other commands from running so until the extension is disabled it's not possible to launch the debugger etc. The only workaround I have (changing from .net 6 is not an option) is to disable the extension.

7.15.2 is the last version that works.

MangelMaxime commented 5 months ago

changing from .net 6 is not an option

You mean because your project needs to use .NET 6? If yes, then you can install another version of .NET side by side with the one you have. Ionide should pick up the latest version and your project could be told to use .NET by using a global.json file.

If you can't install another version of .NET for another reason then, you probably need to wait for a bug fix to contributed.

sora-tech commented 5 months ago

Installing .NET 8 does fix the issue, at least I think so there's other issues with the FS Explorer opening projects that are on a network share.

Is there a feature request for using the .net install tool extension to avoid these issues in the future?

baronfel commented 5 months ago

There is in my head, but we're not going to use it for a least a few months. It currently installs an extension-local version of the runtime or SDK, and we want to use a global SDK install - I. E. What the user uses on the command line.

I'm on the team that develops that runtime extension so I'm keenly aware of the use case. We're currently working with the Dev Kit extension to manage global SDK installs, and once that's solid I'll look at integrating it here.

TheAngryByrd commented 3 months ago

I think we might be hitting https://github.com/dotnet/fsharp/issues/14313