Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

There was an error activating the remote language server, c#/Visual Basic Language Server client

When I open any project in Microsoft Visual Studio Community 2019 Version 16.8.4, even a simple newly created .net core console project. I get the error message:

There was an error activating the remote language server, c#/Visual Basic Language Server client.

Afterwards there is no IntelliSense and even though I am able to run a build of the project no errors or warnings appear in visual studio.

The activity monitor log shows the following errors:

  • Still unable to load MEF component DLL: Could not load file or assembly 'Microsoft.VisualStudio.CppSvc.Internal, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CodeAnalysis\Microsoft.VisualStudio.CodeAnalysis.VCPlugin.dll

  • Still unable to load MEF component DLL: Could not load file or assembly 'Microsoft.Windows.Simulator.Client, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. c:\program files (x86)\microsoft visual studio\2019\community\common7\ide\commonextensions\platform\diagnosticshub\Microsoft.DiagnosticsHub.VisualStudio.Package.dll

  • Still unable to load MEF component DLL: Could not load file or assembly 'Microsoft.VisualStudio.VC.RecommendationProvider, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\EXTENSIONS\MICROSOFT\INTELLICODE\IntelliCodeCpp.dll

I have tried to restart visual studio, restart windows, repair visual studio, uninstall visual studio and install it again. I have run the netFxRepairTool. Still running into the issue.

The files, that are mentioned in the log are all present at the expected location.

like image 216
Guido Roth Avatar asked Jan 22 '21 17:01

Guido Roth


People also ask

How do I Activate my Language Server?

To activate your language server, you must call StartAsync at some point. ActivateAsync is the method eventually invoked by calling the StartAsync delegate.

Why can't I use Microsoft languageserver with Visual Studio?

Essentially VS is in a state that may prohibit any extension that uses the Microsoft LanguageServer client from working. To fix this, I had to uninstall and reinstall all versions of Visual Studio (including the build tools).

Is there support for custom Language-Server-specific settings?

Support for custom language-server-specific settings is available, but it is still in the process of being improved. Settings are specific to what the language server supports and usually control how the language server emits data.

Who is responsible for running LSP-based language servers in Visual Studio?

By default, the extensions created to support LSP-based language servers in Visual Studio don't contain the language servers themselves or the runtimes needed to execute them. Extension developers are responsible for distributing the language servers and the runtimes needed. There are several ways to do so:


1 Answers

A fix was provided by Microsoft for this issue. See https://developercommunity2.visualstudio.com/t/There-was-an-error-activating-the-remote/1313889?entry=problem for details. You can download the fix at https://visualstudio.microsoft.com/downloads/

like image 116
Guido Roth Avatar answered Oct 22 '22 15:10

Guido Roth