Skip to content

can not run csharp lsp if net 9 installed even i installed net8,Please allow rollforword #7925

@heartacker

Description

@heartacker

Environment data

dotnet --info output:

.NET SDK:
 Version:           9.0.100
 Commit:            a2bc464e40
 Workload version:  9.0.100-manifests.6bf02610
 MSBuild version:   17.12.7+a2bc464e4

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  24.10
 OS Platform: Linux
 RID:         ubuntu.24.10-x64
 Base Path:   /usr/lib/dotnet/sdk/9.0.100/

.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.

Host:
  Version:      9.0.0
  Architecture: x64
  Commit:       a2bc464e40

.NET SDKs installed:
  8.0.111 [/usr/lib/dotnet/sdk]
  9.0.100 [/usr/lib/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.11 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 9.0.0 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.11 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 9.0.0 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

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

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

VS Code version:

版本: 1.96.3
提交: 91fbdddc47bc9c09064bf7acf133d22631cbf083
日期: 2025-01-09T18:14:09.060Z
浏览器: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.96.3 Chrome/128.0.6613.186 Electron/32.2.6 Safari/537.36

C# Extension version:

名称: C#
ID: ms-dotnettools.csharp
说明: Base language support for C#
版本: 2.61.28
发布者: Microsoft
VS Marketplace 链接: https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp

OmniSharp log

2025-01-14 13:52:30.964 [info] Locating .NET runtime version 8.0.10
2025-01-14 13:52:31.421 [info] Dotnet path: /usr/bin/dotnet
2025-01-14 13:52:31.421 [info] Activating C# + C# Dev Kit + C# IntelliCode...
2025-01-14 13:52:42.637 [info] Language server process exited with 131
2025-01-14 13:52:42.650 [info] [Error - 1:52:42 PM] Microsoft.CodeAnalysis.LanguageServer client: couldn't create connection to server.
2025-01-14 13:52:42.650 [info] Error: Language server process exited unexpectedly
    at ChildProcess.<anonymous> (/home/acker/.vscode-server/extensions/ms-dotnettools.csharp-2.61.28-linux-x64/dist/extension.js:2:1177399)
    at ChildProcess.emit (node:events:530:35)
    at ChildProcess.emit (node:domain:489:12)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
2025-01-14 13:52:42.676 [error] [stderr] You must install .NET to run this application.

App: /home/acker/.vscode-server/extensions/ms-dotnettools.csharp-2.61.28-linux-x64/.roslyn/Microsoft.CodeAnalysis.LanguageServer
Architecture: x64
App host version: 8.0.11
.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.24.10&apphost_version=8.0.11


Steps to reproduce

install net 9 and no net 8

Expected behavior

work well

Actual behavior

Additional context

please allow language server runing net 9 and above within --allow-roll-forward

see https://learn.microsoft.com/zh-cn/dotnet/core/tools/dotnet#rollforward

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions