﻿---
title: VSCode插件离线安装教程：VSIX文件下载与安装指南
excerpt: 🤖 详解VSCode插件离线安装方法，包括通过API下载VSIX文件、汉化插件离线安装、SSH远程开发插件管理等实用技巧。解决网络限制环境下VSCode扩展安装问题，提供多种下载渠道和平台适配方案。
cover: https://assets.vluv.space/cover/ToolChain/vsc_vsix.webp
date: 2025-03-25
tags:
  - VSCode
  - VSIX
lang: zh-CN
i18n:
  en: /en/offline_install_extension
updated: 2026-05-08 23:32:41
---

<script data-swup-reload-script type="module" src="/js/components/tab.js"></script>

## Intro

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

> [!info]- 关于 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](https://github.com/microsoft/vsmarketplace/issues/1135)

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

<x-tabs>

<x-tab title="通过URL下载" active>

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

![vscode_offline](https://assets.vluv.space/vscode_offline.webp)

插件右侧有如下信息，在右侧侧边栏找到 `More Info` 区域，记录以下两个关键信息：

- 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`

替换链接中的占位符

| 参数占位符         | 说明      | 示例值 (中文插件)              | 对应 ID 部分          |
| ------------------ | --------- | ------------------------------ | --------------------- |
| `{publisher_id}`   | 发布者 ID | `ms-ceintl`                    | ID 点号**前面**的部分 |
| `{extension_name}` | 插件名称  | `vscode-language-pack-zh-hans` | ID 点号**后面**的部分 |
| `{version}`        | 版本号    | `1.99.2025031909`              | Version 字段          |

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

> [!info]- 下载指定平台的插件
> 部分插件须下载对应系统的版本，如果直接下载通用包可能无法使用，可在链接末尾添加 `?targetPlatform={platform}` 参数指定目标平台。
>
> | Binary type         | Target Platform |
> | ------------------- | --------------- |
> | Alpine Linux 64 bit | alpine-x64      |
> | Alpine Linux ARM64  | alpine-arm64    |
>|  Linux ARM32         | linux-armhf     |
>|  Linux ARM64         | linux-arm64     |
>|  Linux x64           | linux-x64       |
>|  Windows ARM         | win32-arm64     |
>|  Windows x64         | win32-x64       |
>|  macOS Apple Silicon | darwin-arm64    |
>|  macOS Intel         | darwin-x64      |

</x-tab>

<x-tab title="通过第三方插件市场下载">

或者可以在以下网站在线搜索插件，下载 VSIX 文件
-  [Open VSIX Gallery](https://www.vsixgallery.com/)
-  [open-vsx.org](https://open-vsx.org/)

</x-tab>

<x-tab title="使用SCP下载，适用SSH开发">

部分场景是：localhost 有网络，但 ssh 连接的 remote host 不能访问外网 🌚

解决方案：参考如下设置。

启用后，将会在 localhost download `.vsix` file，使用 `scp` 将插件发生到 remote host

![vscode_settings](https://assets.vluv.space/vscode_install_offline.webp)

</x-tab>

</x-tabs>

## VSIX插件文件安装步骤详解

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

<x-tabs>

<x-tab title="图形化方式安装" active>

1. 按快捷键：<kbd>Ctrl+Shift+P</kbd> / <kbd>⌘+⇧+P</kbd>
2. 输入并选择：`Extensions: Install from VSIX`
3. 在弹出的文件选择窗口中，找到并选中你下载的 `.vsix` 文件。

![vscode](https://assets.vluv.space/vscode_offline_install.webp)

</x-tab>

<x-tab title="CLI">

在终端执行 `{sh} code --install-extension <path_to_vsix_file>`

</x-tab>

</x-tabs>

## Reference

- [Publishing Extensions](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#public-rest-api)
