visual-studio-code - 每当我重新启动 Visual Studio Code 时,远程 - WSL 扩展都会给我警告消息
问题描述
我在 WSL2 上安装了带有 Node.JS 14.16.0 的 Visual Studio Code(版本 1.59.0)(从 WSL1 更新)
每次我启动 Visual Studio Code 时,远程 - WSL(扩展)都会发出警告“您当前正在使用 WSL 1。我们强烈建议升级到 WSL 2 以提高性能。”
阅读更多按钮只是将我重定向到 Microsoft 的比较 WSL 1 和 WSL 2 页面。“https://docs.microsoft.com/en-us/windows/wsl/compare-versions”
但我已经将 WSL 升级到 WSL2(内核 5.10.16)
我还从 Windows PowerShell 运行了“wsl --set-default-version 2”,它工作正常。
尝试卸载并重新安装 Remote - Visual Studio Code 的 WSL 扩展,但失败。
这有什么问题?
解决方案
打开powershell并运行命令:
wsl --set-version <your distro name here> 2
提示会向您返回一条消息,例如“转换此任务可能需要请假时间”。
然后在 WSL 上打开 VSCode。
推荐阅读
- angular - PrimeNG - PrimeFaces
- javascript - 无法加载样式和执行脚本 Express JS
- url - 如何上传应用了急切转录的视频?
- python - 在 AWS Cloud9 Lambda 中导入 python 文件
- python - 在 Python GTK3 中使用 matplotlib 进行 Blitting
- c - 命令行参数第二高的数字 - C 程序
- html - Flexbox wrap 不适用于多个子 div
- python - 具有可变批量大小的 TensorFlow 数据集`from_generator`
- docker - Dockerfile 中的密码
- react-native - 将 Redux Store 连接到组件以使用标记填充地图