VSCode插件离线安装教程:VSIX文件下载与安装指南lqip

VSCode插件离线安装教程:VSIX文件下载与安装指南

Intro

之前在小红书刷到帖子,楼主不能正常下载 VSCode 汉化插件,当时评论了在 Marketplace 下载 VSIX 文件离线安装的方法;后续有人反馈找不到下载按钮,在 VSCode Marketplace 上找了一下,发现 VSCode 团队似乎把这个 UI 入口移除了;本文介绍如何通过 VSCode 通过 API 接口离线下载插件,以及如何安装离线下载的插件。

关于 VSCode Marketplace 为什么移除下载按钮

One of the main reasons for the removal of the Download Extension button was that it was not supporting pre-release extensions, and was a constant source of user confusion. E.g. users want to download the latest release version of the extension, but the button downloads the highest version, which is the pre-release version. Also platform specific extensions dropdown was highly confusing. Having the Download Extension button in VS Code - both of those problems get fixed, the right platform gets auto-picked, and the release / pre-release is respected.

省流版:插件市场移除下载按钮的原因是为了避免用户下载到不适合自己平台的插件,或者下载到预发布版本的插件

No download link for extensions under Version History

VSCode插件VSIX文件离线下载方法

该方法使用的微软官方的 API 接口,相对稳定。以汉化插件为例

插件右侧有如下信息

  • Identifier: ms-ceintl.vscode-language-pack-zh-hans
  • Version: 1.99.2025031909

VSCode 下载插件的链接格式为:
https://marketplace.visualstudio.com/_apis/public/gallery/publishers/{publisher_id}/vsextensions/{extension_name}/{version}/vspackage

替换链接中的占位符

占位符示例值
{publisher_id}ms-ceintl
{extension_name}vscode-language-pack-zh-hans
{version}1.99.2025031909

打开https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-ceintl/vsextensions/vscode-language-pack-zh-hans/1.99.2025031909/vspackage链接,即可在浏览器下载插件到本地,格式一般为 .vsix

下载指定平台的插件

  • ?targetPlatform=win32-x64:指定插件的目标平台,部分插件可能不是 universal 的,此时可以使用该参数指定目标平台。
Binary typeTarget Platform
Alpine Linux 64 bitalpine-x64
Alpine Linux ARM64alpine-arm64
Linux ARM32linux-armhf
Linux ARM64linux-arm64
Linux x64linux-x64
Windows ARMwin32-arm64
Windows x64win32-x64
macOS Apple Silicondarwin-arm64
macOS Inteldarwin-x64

VSIX插件文件安装步骤详解

下载好插件后,可通过如下方式在 VSCode 中安装插件

快捷键:Ctrl+Shift+P (Windows) / Cmd+Shift+P (Mac)
输入并选择:Extensions: Install from VSIX

vscode

Reference

VSCode插件离线安装教程:VSIX文件下载与安装指南

https://vluv.space/offline_install_extension/

作者

GnixAij

发布于

2025-03-25

更新于

2025-10-25

许可协议

评论