Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / Python

Fixing VS Code Extension Errors

0.00/5 (No votes)
3 Aug 2019CPOL1 min read 14.2K  
Resolve VS Code extension errors by forcing a new download

Python Tools Server Crashing

Very confused

 

I recently encountered a problem with Python Tools not loading on VS Code running on Windows 10.  After some research, I found out that the problem resulted from a corrupted dot net installation.  As the Python Tools on VS Code installs the runtime with the Python Tools extension, the problem couldn't be resolved by installing the dotnet runtime.   Uninstalling or disabling the Python Tools extension would also not help.  The error below persisted.

 

Starting Microsoft Python language server.
Error:
  An assembly specified in the application dependencies manifest (Microsoft.Python.LanguageServer.deps.json) was not found:
    package: 'runtime.win-x64.Microsoft.NETCore.App', version: '2.2.4'
    path: 'runtimes/win-x64/lib/netcoreapp2.2/System.Runtime.InteropServices.RuntimeInformation.dll'
[Info  - 9:56:26 PM] Connection to server got closed. Server will restart.

 

Uninstalling and reinstalling VS Code did not solve the problem.  

Solution 

The solution is to find the extension folder of VS Code and delete the language server folder manually.

Image 2

Unfortunately, this folder is not deleted when you uninstall the extension.

The extensions folder is in C:\users\yourname\.vscode\extensions\name-of-extension

Once you delete the folder languageServer.0.3.xx, the extension will be downloaded again. 

Image 3

Other Extensions

The behavior of VS Code to retain corrupted extension files even after VS Code and the extension are uninstalled can create problems for other plug-ins as well.  If your plug-in is acting weirdly or crashing, consider deleting the extension directory from your system from the .vscode folder located in your home directory.

History

 

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)