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

Extension Not Activating When Using .NET 6

Open han-tyumi opened this issue 1 year ago • 7 comments

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

  • OS: Mac
  • .NET SDK version: 6.0.417
  • Ionide version: 7.16.1

Additional context

TODO

han-tyumi avatar Dec 14 '23 21:12 han-tyumi

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?

pseudoramble avatar Jan 23 '24 13:01 pseudoramble

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

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

MangelMaxime avatar Jan 23 '24 18:01 MangelMaxime

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.

sora-tech avatar Jan 27 '24 13:01 sora-tech

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.

MangelMaxime avatar Jan 27 '24 14:01 MangelMaxime

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?

sora-tech avatar Jan 27 '24 15:01 sora-tech

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.

baronfel avatar Jan 27 '24 15:01 baronfel

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

TheAngryByrd avatar Apr 04 '24 14:04 TheAngryByrd