Download VSIX Files from VS Code Marketplace
Problem
Microsoft removed the in-browser download option for .vsix
files from the VS Code Marketplace, making it difficult to obtain extension installation packages for offline machines. Developers needing to install extensions like Python or Pylance in disconnected environments can no longer rely on the browser interface or older methods documented in official instructions.
Note on Built-in Solution
VS Code v1.96+ introduced a built-in method: Use the extensions sidebar → extension settings → Download Extension VSIX
. However, this requires an updated VS Code installation with internet access.
Recommended Solutions
Method 1: Manual URL Construction (Official API)
All .vsix
downloads still use Microsoft's public API. Construct the URL manually using:
- Extension Identifier: Split into Publisher and Package
(e.g.,ms-python.python
→ Publisher:ms-python
, Package:python
) - Version: Find in the "Version History" marketplace tab
(e.g.,2024.17.2024100401
) - Target Platform (skip for universal extensions):
Platform | targetPlatform Value |
---|---|
Windows x64 | win32-x64 |
macOS Apple Silicon | darwin-arm64 |
macOS Intel | darwin-x64 |
Linux x64 | linux-x64 |
Linux ARM64 | linux-arm64 |
[See all platforms] | [Full table in solution] |
- URL Format:Example:
https://marketplace.visualstudio.com/_apis/public/gallery/publishers/[Publisher]/vsextensions/[Package]/[Version]/vspackage?targetPlatform=[Platform]
https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-python/vsextensions/python/2024.17.2024100401/vspackage?targetPlatform=win32-x64
# Generate URL automatically
unique_id = "ms-python.python"
version = "2024.17.2024100401"
platform = "win32-x64" # Use "" for universal extensions
publisher, package = unique_id.split('.')
url = (
f"https://marketplace.visualstudio.com/_apis/public/gallery/publishers/{publisher}/"
f"vsextensions/{package}/{version}/vspackage"
+ (f"?targetPlatform={platform}" if platform else "")
)
print(url) // Copy and paste URL into browser to download
Method 2: TamperMonkey Script (Automated Version Downloads)
This userscript adds direct download links to version numbers in the marketplace.
- Install TamperMonkey
- Create a new script and paste this code:
// ==UserScript==
// @name VS Marketplace VSIX Links
// @match https://marketplace.visualstudio.com/items*
// ==/UserScript==
const platformMap = {
"Linux x86_64": "linux-x64",
"Win32": "win32-x64", // Add your platform
"MacIntel": "darwin-x64" // Add mappings as needed
};
function addLinks() {
const rows = document.querySelectorAll('.version-history-container-row');
const identifier = new URLSearchParams(location.search).get('itemName');
if (!identifier || !rows.length) return setTimeout(addLinks, 500);
const [publisher, pkg] = identifier.split('.');
const platform = platformMap[navigator.platform] || 'linux-x64';
rows.forEach(row => {
const versionCell = row.querySelector('.version-history-container-column');
if (!versionCell || versionCell.querySelector('a')) return;
const version = versionCell.textContent.trim();
const vsixUrl = `https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${publisher}/vsextensions/${pkg}/${version}/vspackage?targetPlatform=${platform}`;
const link = document.createElement('a');
link.href = vsixUrl;
link.textContent = version;
versionCell.textContent = '';
versionCell.appendChild(link);
});
}
setTimeout(addLinks, 1000);
WARNING
Update platformMap
with your OS using navigator.platform
values seen in console. Remove ?targetPlatform=...
from the URL if download fails (indicates universal extension).
Alternative Methods
- Chrome Extension: Install VS Marketplace Downloader to add download buttons
- Bookmarklet: Create a bookmark with this URL (works when on extension page):javascript
javascript:(function(){const API='https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${publisher}/vsextensions/${package}/${version}/vspackage';const id=new URL(location).searchParams.get("itemName");const[pkg,publisher]=id.split(".");const version=document.querySelector('.version-history-container-row .version-history-container-column').textContent;window.open(API.replace('${publisher}',publisher).replace('${package}',pkg).replace('${version}',version))})();
- open-vsx.org: Open VSX Registry provides direct downloads for many extensions
- Build from Source (Fallback option):bash
git clone <extension-repo-url> cd extension-dir npm install -g @vscode/vsce vsce package # Generates .vsix in current directory
Conclusion
For most users, constructing the download URL (Method 1) provides the most reliable way to obtain .vsix
files. The TamperMonkey script automates this process once configured. When possible, update VS Code to v1.96+ and use the built-in download option via the extensions sidebar.