csharp-language-server icon indicating copy to clipboard operation
csharp-language-server copied to clipboard

Doesn't find installed sdk

Open tilupe opened this issue 2 years ago • 6 comments

I tried to use the c-sharp-server in neovim, but I ran into a error. So I tried to run the server just by itself and I got:


You must install or update .NET to run this application.

App: /home/USER/.local/share/nvim/mason/packages/csharp-language-server/csharp-ls Architecture: x64 Framework: 'Microsoft.NETCore.App', version '7.0.0' (x64) .NET location: /usr/lib/dotnet

No frameworks were found.

Learn about framework resolution: https://aka.ms/dotnet/app-launch-failed

To install missing framework, download: https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=7.0.0&arch=x64&rid=pop.22.04-x64


But my I have 7.0 installed but it is at /usr/share/dotnet/sdk and not at /usr/lib/dotnet I tried adding a symlink but it wouldn't help. Then I realized I missed the runtime and installed it but I still got:


You must install .NET to run this application.

App: /home/notomoro/.local/share/nvim/mason/packages/csharp-language-server/csharp-ls Architecture: x64 App host version: 7.0.2 .NET location: Not found

Learn about runtime installation: https://aka.ms/dotnet/app-launch-failed

Download the .NET runtime: https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=pop.22.04-x64&apphost_version=7.0.2


I am not sure if this is a installation problem of I am using Pop-Os 22.04

dotnet --list-sdks 7.0.102 [/usr/share/dotnet/sdk]

dotnet --list-runtimes Microsoft.AspNetCore.App 7.0.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 7.0.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

I installed csharp-language-server via https://github.com/williamboman/mason.nvim

Maybe this is a package problem on my side?

tilupe avatar Feb 09 '23 15:02 tilupe

Sorry for opening the issue to fast. I could resolve it by creating the correct symlinks. I added now symlinks from /usr/lib/dotnet/shared/Microsoft.NETCore.App and Microsoft/AspNetCore.App to /ust/share/dotnet/shared/Microsoft.NETCore.App/7.0.2 and Microsoft/AspNetCore.App

Not sure if this was a mistake of my side or changes of Microsoft where they install the runtimes (it seemd 6.0 is installed still at the "correct"/"old" place.)

Feel free to close this issue if there must me nothing adapted

tilupe avatar Feb 09 '23 15:02 tilupe

I have a similar issue:

[ERROR][2023-02-14 09:22:38] .../vim/lsp/rpc.lua:734	"rpc"	"csharp-ls"	"stderr"	"No .NET SDKs were found.\n\nDownload a .NET SDK:\nhttps://aka.ms/dotnet/download\n\nLearn about SDK resolution:\nhttps://aka.ms/dotnet/sdk-not-found\n"

csharp-ls runs from CLI normally though. And SDKs and all exist (but not in /usr/lib or anywhere in "standard locations")

WhiteBlackGoose avatar Feb 14 '23 06:02 WhiteBlackGoose

Changing DOTNET_ROOT environment variable (on pop os in /etc/profile.d/dotnet.sh) to location of dotnet helped.

Veliti avatar Apr 02 '23 13:04 Veliti

I have a similar issue:

[ERROR][2023-02-14 09:22:38] .../vim/lsp/rpc.lua:734	"rpc"	"csharp-ls"	"stderr"	"No .NET SDKs were found.\n\nDownload a .NET SDK:\nhttps://aka.ms/dotnet/download\n\nLearn about SDK resolution:\nhttps://aka.ms/dotnet/sdk-not-found\n"

csharp-ls runs from CLI normally though. And SDKs and all exist (but not in /usr/lib or anywhere in "standard locations")

I have the exact same error, did you find a solution?

lungarella-raffaele avatar Mar 26 '24 16:03 lungarella-raffaele

I also have the same error. Tried both solutions listed here, nothing helped. Did anybody find a solution?

Polanas avatar Jun 19 '24 05:06 Polanas

My error resolved by doing a clean re-installation of everything. I don't know which was the problem but I advice you to do the same

lungarella-raffaele avatar Jun 19 '24 05:06 lungarella-raffaele