The way developers access .vsix files for Visual Studio Code extensions has changed. Previously, downloading these files directly from the VS Code Marketplace website was straightforward. However, this option is no longer readily available, causing a hurdle for those needing to install extensions on offline machines or manage specific versions.

The Problem: Missing Download Button

You might have noticed that the “Download” button for .vsix files on the official VS Code Marketplace website has disappeared. This change means the familiar method of grabbing extension files directly from your browser is gone. If you’re using an older version of VS Code (like v1.94, as one user experienced), the in-app download option might also be missing. The “official” intended method now steers users towards obtaining .vsix files through an installed copy of VS Code itself.

Solution 1: Constructing the Download URL Manually

One effective way to get the .vsix file is by manually constructing the download URL. This involves a few steps:

1. Get the Extension’s Unique Identifier: Find this on the extension’s marketplace page. It will look something like ms-python.python. Split this into the publisher (ms-python) and the extension name (python).

2. Find the Version Number: Go to the “Version History” tab on the marketplace page for the extension and copy the desired version number (e.g., 2024.17.2024100401).

3. Determine the Target Platform (if needed): Some extensions are “Universal,” but others require specifying a target platform. Common examples include linux-x64, win32-x64, or darwin-arm64.

4. Combine the Information: Assemble the URL like this:

https://marketplace.visualstudio.com/_apis/public/gallery/publishers/[PUBLISHER]/vsextensions/[EXTENSION_NAME]/[VERSION]/vspackage

If a target platform is needed, append ?targetPlatform=[TARGET_PLATFORM] to the URL. For example:

https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-python/vsextensions/python/2024.17.2024100401/vspackage?targetPlatform=win32-x64

Pasting this constructed URL into your browser should start the download.

Solution 2: Building from Source with vsce

If constructing URLs isn’t your preference, or if you need a specific version not easily found, you can build the .vsix file from the extension’s source code.

1. Get the Source Code: On the extension’s marketplace page, find the link to its repository (usually on GitHub). Clone or download the source code.

2. Install vsce: You’ll need Node.js and npm installed. Then, install vsce (Visual Studio Code Extensions packager) globally by running:

npm install -g @vscode/vsce

3. Package the Extension: Navigate to the root directory of the downloaded extension source code in your terminal and run:

vsce package

This command will generate the .vsix file in the current directory. This method also works if you have VS Code with the extension already installed; you can find the extension files in your VS Code data directory (e.g., data/extension in a portable install) and run vsce package there.

Installing Your Manually Downloaded .vsix File

Once you have your .vsix file, installing it into VS Code is straightforward:

  1. Open VS Code.
  2. Navigate to the Extensions View: Click on the Extensions icon in the Activity Bar on the side of VS Code (it looks like square blocks), or press Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (macOS).
  3. Install from VSIX: In the Extensions view, click on the three dots (…) menu in the top-right corner. Select “Install from VSIX…” from the dropdown menu.
  4. Select Your File: A file dialog will open. Navigate to the location where you saved your .vsix file, select it, and click “Install.”
  5. Reload (if prompted): VS Code might prompt you to reload the window to activate the newly installed extension.

    Alternative Solutions

    • Browser Extensions/Scripts: Some community-developed browser extensions (like one for Chrome mentioned on Stack Overflow) or TamperMonkey scripts aim to restore download links or automate the URL construction process on the marketplace pages. Remember to rename downloaded .zip files to .vsix if using such tools.
    • Updating VS Code: The original poster on Stack Overflow found their issue was resolved by updating their VS Code installation from v1.94 to v1.96, which made the download option available within VS Code itself. Ensuring your VS Code is up-to-date on an internet-connected machine can be the simplest fix.
    • Open VSX Registry: For an open-source alternative to the Visual Studio Marketplace, check out open-vsx.org. It often provides direct download links to .vsix files, including non-latest versions, without the need to build from source or manually craft URLs.

    Oh hi there 👋
    It’s nice to meet you.

    You have got "Azure OpenAI for Developers" ebook for FREE.

    We don’t spam! Read our privacy policy for more info.

    You’ve been successfully purchased the Ebook. It will be delivered to your mail shortly!

    Categorized in: