镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

🐞 CSharp (C#) Language Server can't be installed. #2168

Description

@ShikiSuen

Description

CSharp (C#) Language Server can't be installed.

To Reproduce

Settings -> Language Server -> Csharp Language Server -> Click Install.

Expected Behavior

A successful installation.

Version Information

CodeEdit: CodeEdit: 0.3.6 (47) (public release)
macOS: 26.3.0

Additional Context

No response

Screenshots

Image

Activity

  1. vksvicky commented on Jul 15, 2026

    @vksvicky
    Contributor

    Root cause

    “Csharp Language Server” maps to the Mason package csharp-language-server, which is installed via NuGet:

    pkg:nuget/csharp-ls@0.24.0
    

    CodeEdit’s registry installer currently understands pkg:cargo, pkg:npm, pkg:pypi, pkg:gem, pkg:golang, and pkg:github only. There is no parser or package manager for pkg:nuget/, so installMethod is nil and installation fails with PackageManagerError (the alert surfaces this poorly as error 3).

    This matches an existing TODO in InstallationMethod.packageManager for NuGet (and Opam / Gem / Composer).

    Impact

    The same gap affects other NuGet-based language servers in the registry (e.g. roslyn-language-server, fsautocomplete), not only C#.

    Workaround

    Until NuGet support lands, try a GitHub-backed C# server such as OmniSharp (omnisharp / omnisharp-mono), which uses pkg:github and should be installable with the existing GitHub installer. Alternatively, install csharp-ls manually with the .NET SDK (dotnet tool install).

    Suggested fix

    1. Parse pkg:nuget/… and implement a NuGet / dotnet tool installer.
    2. Improve UX for unsupported package types (clear message, or disable Install) so users do not see opaque PackageManagerError codes.

    I shall implement this approach, hopefully this is ok?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions