Can Language Server (LSP) run in the same process as devenv.exe ?

Sajith 11 Reputation points
2024-09-09T15:15:41.8533333+00:00

I am working on an extension for Visual Studio. This implements a Language Server (LSP) also. Both extension and LSP are written in C#.NET. Is it a requirement that Language Server run in a separate process? Or can the Language Server be implemented as a dll and run in the same process as the extension and devenv ?

Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
226 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Joshua Lazaro Marandi 70 Reputation points
    2024-09-13T05:26:26.9533333+00:00

    While it's technically possible to run a Language Server (LSP) as a DLL within the same process as a Visual Studio extension, it’s generally recommended to run the LSP in a separate process. This approach ensures better stability, isolation, and performance. Running the server separately prevents issues like crashes from affecting the entire devenv.exe process and provides better resource management​ (GitHub)​(Telerik.com).

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.