Answer a question

The built-in Git extension has somehow become deactivated in VS code and can't be re-enabled. If I open the extension page it gives the following error:

"This extension is disabled in this workspace because it is defined to run in the Remote Extension Host. Please install the extension in 'WSL: Ubuntu' to enable."

screenshot

If I open the GitHub extension page I get the same message, but GitHub Authentication still seems to be activated okay. As far as I can tell I am already in the Remote Extension Host. Additionally the source control tab is saying that no source control providers are registered.

The Git extension has been working for me for months since I updated to WSL2, I've not installed any other extensions recently, but it seems to have started after rebooting my machine. I've tried rebooting and restarting VS code, deactivating GitHub authentication and GitLens then restarting VS code and that hasn't done anything.

Answers

Okay, I solved it. I uninstalled Visual Studio Code, and removed the directory .vscode-server from my home directory in wsl. Then I reinstalled VS code and reran the code . command in wsl. I haven't tested whether removing .vscode-server then rerunning code will work without a clean reinstall of VS code, but suspect it might.

Logo

开发云社区提供前沿行业资讯和优质的学习知识,同时提供优质稳定、价格优惠的云主机、数据库、网络、云储存等云服务产品

更多推荐