C
C#ā€¢13mo ago
hanu

csharp-ls cannot locate .net

$ dotnet tool list -g
Package Id Version Commands
--------------------------------------
csharp-ls 0.10.0 csharp-ls

$ dotnet --info
.NET SDK:
Version: 8.0.100
Commit: 57efcf1350
Workload version: 8.0.100-manifests.6c33ef20

Runtime Environment:
OS Name: ubuntu
OS Version: 22.04
OS Platform: Linux
RID: linux-x64
Base Path: /home/hanu/.dotnet/sdk/8.0.100/

.NET workloads installed:
Workload version: 8.0.100-manifests.6c33ef20
There are no installed workloads to display.

Host:
Version: 8.0.0
Architecture: x64
Commit: 5535e31a71

.NET SDKs installed:
8.0.100 [/home/hanu/.dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.0 [/home/hanu/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.0 [/home/hanu/.dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
Not set

global.json file:
/home/hanu/repos/csharp-language-server/global.json

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

$ csharp-ls
You must install .NET to run this application.

App: /home/hanu/.dotnet/tools/csharp-ls
Architecture: x64
App host version: 8.0.0
.NET location: Not found

Learn more:
https://aka.ms/dotnet/app-launch-failed

Download the .NET runtime:
https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=linux-x64&os=ubuntu.22.04&apphost_version=8.0.0
$ dotnet tool list -g
Package Id Version Commands
--------------------------------------
csharp-ls 0.10.0 csharp-ls

$ dotnet --info
.NET SDK:
Version: 8.0.100
Commit: 57efcf1350
Workload version: 8.0.100-manifests.6c33ef20

Runtime Environment:
OS Name: ubuntu
OS Version: 22.04
OS Platform: Linux
RID: linux-x64
Base Path: /home/hanu/.dotnet/sdk/8.0.100/

.NET workloads installed:
Workload version: 8.0.100-manifests.6c33ef20
There are no installed workloads to display.

Host:
Version: 8.0.0
Architecture: x64
Commit: 5535e31a71

.NET SDKs installed:
8.0.100 [/home/hanu/.dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.0 [/home/hanu/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.0 [/home/hanu/.dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
Not set

global.json file:
/home/hanu/repos/csharp-language-server/global.json

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

$ csharp-ls
You must install .NET to run this application.

App: /home/hanu/.dotnet/tools/csharp-ls
Architecture: x64
App host version: 8.0.0
.NET location: Not found

Learn more:
https://aka.ms/dotnet/app-launch-failed

Download the .NET runtime:
https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=linux-x64&os=ubuntu.22.04&apphost_version=8.0.0
I have csharp-ls and dotnet installed but csharp-ls does not start. What is the problem?
18 Replies
333fred
333fredā€¢13mo ago
Did you set DOTNET_HOME? It looks like you didn't
hanu
hanuOPā€¢13mo ago
$ export DOTNET_ROOT="$(dirname $(which dotnet))"

$ csharp-ls
You must install or update .NET to run this application.

App: /home/hanu/.dotnet/tools/csharp-ls
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '7.0.0' (x64)
.NET location: /home/hanu/.dotnet

The following frameworks were found:
8.0.0 at [/home/hanu/.dotnet/shared/Microsoft.NETCore.App]

Learn more:
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=linux-x64&os=ubuntu.22.04
$ export DOTNET_ROOT="$(dirname $(which dotnet))"

$ csharp-ls
You must install or update .NET to run this application.

App: /home/hanu/.dotnet/tools/csharp-ls
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '7.0.0' (x64)
.NET location: /home/hanu/.dotnet

The following frameworks were found:
8.0.0 at [/home/hanu/.dotnet/shared/Microsoft.NETCore.App]

Learn more:
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=linux-x64&os=ubuntu.22.04
333fred
333fredā€¢13mo ago
That probably isn't the right place to point the root at
hanu
hanuOPā€¢13mo ago
i set DOTNET_ROOT and i had some progress oh
333fred
333fredā€¢13mo ago
Oh, actually, no It is correct But csharp-ls doesn't support 8.0 and doesn't have rollForward turned on, apparently
hanu
hanuOPā€¢13mo ago
it seems i need .net 7?
333fred
333fredā€¢13mo ago
So you'll need to install 7.0
hanu
hanuOPā€¢13mo ago
can i install 7.0 with dotnet cli?
333fred
333fredā€¢13mo ago
Is there a reason you're using csharp-ls specifically? No. You'd have to use whatever mechanism you used to install dotnet originally
hanu
hanuOPā€¢13mo ago
i wanted to experience C# with neovim
333fred
333fredā€¢13mo ago
@PixxelKick happens to have just done that setup today with roslyn's lsp
hanu
hanuOPā€¢13mo ago
@333fred I script installed .net 7 and it seems to work fine šŸ˜Œ thanks
333fred
333fredā€¢13mo ago
Glad to hear it. I would definitely recommend checking out the roslyn lsp before long My understanding of razzmatazz's lsp is that it was missing several things and wasn't a huge focus of razz's time, though I could be mistaken
hanu
hanuOPā€¢13mo ago
okay thanks for your advice
PixxelKick
PixxelKickā€¢13mo ago
ah yeah, give me one sec and I can push what I have atm on my repo
PixxelKick
PixxelKickā€¢13mo ago
GitHub
GitHub - SteffenBlake/pixxel-nvim: My personal Neovim configuration
My personal Neovim configuration. Contribute to SteffenBlake/pixxel-nvim development by creating an account on GitHub.
hanu
hanuOPā€¢13mo ago
thanks for your help

Did you find this page helpful?