Skip to content

Missing Microsoft.CodeAnalysis.Workspaces when using a workspace #53

@Scriptodude

Description

@Scriptodude

I currently work on several projects on the side with a folder structure similar to the following:

root/
  project-1/
    backend/ <- csharp project
    frontend/ <- typescript project
  project-2/
    backend/ <- csharp project
    frontend/ <- typescript project

I tried configuring the extension to use such folder structure:

"lsp": {
    "roslyn": {
      "settings": {
        "workspace": {
          "workspaceFolders": [
            {
              "uri": "./project-1/backend",
              "name": "p1-backend",
            },
            {
              "uri": "./project-2/backend",
              "name": "p2-backend",
            },
          ],
        },
      },
    },
 },

However with or without the configuration I get the following error from roslyn:

Language server roslyn:

initializing server roslyn, id 88: Server reset the connection
-- stderr --
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.CodeAnalysis.Workspaces, Version=5.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.

File name: 'Microsoft.CodeAnalysis.Workspaces, Version=5.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at Program.<Main>$(String[] args)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Program.<Main>$(String[] args)
   at Program.<Main>(String[] args)

thread 'main' (13941086) panicked at src/main.rs:89:22:
Unable to send open solution notification to server: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I believe the csharp-language-server tool is missing a configuration - should I open a bug on their side also ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions