williamboman / nvim-lsp-installer

Further development has moved to https://github.com/williamboman/mason.nvim!
https://github.com/williamboman/mason.nvim
Apache License 2.0
2k stars 123 forks source link

Cannot install `csharp_ls`: `error NU1202: Package csharp-ls 0.3.0 is not compatible with net5.0 (.NETCoreApp,Version=v5.0) / any. Package csharp-ls 0.3.0 supports: net6.0 (.NETCoreApp,Version=v6.0) / any` #470

Closed nyngwang closed 2 years ago

nyngwang commented 2 years ago

Problem description

I expect to install it without any strange preconfig,

Neovim version (>= 0.6)

NVIM v0.7.0-dev+1049-g3b4bf8871 Build type: Release LuaJIT 2.1.0-beta3

Operating system/version

macOS 12.2(21D49)

I've recently downloaded the latest plugin version of both nvim-lsp-installer and nvim-lspconfig

Affected language servers

csharp_ls

Actual behavior

    ◍ csharp_ls (failed)
        warning NU3028: Package 'csharp-ls 0.3.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
        error NU1202: Package csharp-ls 0.3.0 is not compatible with net5.0 (.NETCoreApp,Version=v5.0) / any. Package csharp-ls 0.3.0 supports: net6.0 (.NETCoreApp,Version=v6.0) / any
        Tool 'csharp-ls' failed to update due to the following:
        The tool package could not be restored.
        Tool 'csharp-ls' failed to install. This failure may have been caused by:

        * You are attempting to install a preview release and did not use the --version option to specify the version.
        * A package by this name was found, but it was not a .NET tool.
        * The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
        * You mistyped the name of the tool.

        For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool

Expected behavior

get it correctly installed by default.

LspInstallInfo output

No response

Installation log

[ERROR Thu Feb 10 15:48:58 2022] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:153: Failed to spawn process. cmd="gh", err="ENOENT: no such file or directory"
[ERROR Thu Feb 10 15:48:58 2022] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:153: Failed to spawn process. cmd="gh", err="ENOENT: no such file or directory"
[ERROR Thu Feb 10 16:14:40 2022] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:153: Failed to spawn process. cmd="gh", err="ENOENT: no such file or directory"
[ERROR Thu Feb 10 16:14:43 2022] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:153: Failed to spawn process. cmd="gh", err="ENOENT: no such file or directory"
[INFO  Thu Feb 10 16:16:29 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:644: Starting install server_name="csharp_ls", requested_version=""
[INFO  Thu Feb 10 16:16:50 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:663: Installation completed server_name="csharp_ls", success=false
[INFO  Thu Feb 10 16:16:55 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:644: Starting install server_name="csharp_ls", requested_version=""
[INFO  Thu Feb 10 16:16:57 2022] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:663: Installation completed server_name="csharp_ls", success=false

Healthcheck

nvim-lsp-installer: require("nvim-lsp-installer.health").check()
========================================================================
## nvim-lsp-installer report
  - OK: neovim version >= 0.6.0
  - WARNING: **Composer**: not available
  - WARNING: **PHP**: not available
  - WARNING: **julia**: not available
  - OK: **tar**: `bsdtar 3.5.1 - libarchive 3.5.1 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8 `
  - OK: **gzip**: `Apple gzip 352.40.6`
  - OK: **curl**: `curl 7.77.0 (x86_64-apple-darwin21.0) libcurl/7.77.0 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.42.0`
  - OK: **wget**: `GNU Wget 1.21.2 built on darwin21.1.0.`
  - OK: **python3**: `Python 3.9.10`
  - OK: **node**: `v16.8.0`
  - OK: **Ruby**: `ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21]`
  - OK: **Go**: `go version go1.17.6 darwin/amd64`
  - OK: **sh**: `Ok`
  - OK: **bash**: `GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin21)`
  - OK: **RubyGem**: `3.0.3.1`
  - OK: **npm**: `7.21.0`
  - OK: **pip3**: `pip 21.3.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)`
  - OK: **java**: `Ok`
  - OK: **javac**: `javac 11.0.11`

Screenshots

No response

williamboman commented 2 years ago

Hey! It seems like you've got dotnet v5 installed, the csharp-ls package requires dotnet v6. Would you be able to upgrade your dotnet installation to v6?

nyngwang commented 2 years ago

Let me try it! I just saw your comment :) Wait a minute

@williamboman update: I'm using homebrew on macOS. The stable version I got brew info dotnet is v5. Is that dotnet-sdk, which has version 0.6, is it the same thing as you said?

Sorry for the ping! Just Resolved it from their README:

csharp-ls requires .NET 6 SDK to be installed. [...]

nyngwang commented 2 years ago

@williamboman: I got this error after I re-installed it today:

Spawning language server with cmd: `..../.local/share/nvim/lsp_servers/omnisharp/omnisharp/run` failed.
The language server is either not installed, missing from PATH, or not executable.

It seems like it's not related to upstream: https://github.com/neovim/nvim-lspconfig/issues/1719

mjlbach commented 2 years ago

chsharp_ls != omnisharp

nyngwang commented 2 years ago

@mjlbach: Yes but I finally resolved my problem by using omnisharp. But still thanks for the correction.