I need to download .vsix versions of extensions for my coding environment (Python and Pylance) on an offline machine, but there does not appear to be a way to do so.
The official instructions appear to be out of date and so do answers to a similar question. Is Microsoft no longer allowing .vsix downloads directly? The method from the older question does download the VSIXPackage but this doesn't seem to be the intended way. What happened?
You can construct the .vsix download URL by hand.
Get extension's "Unique Identifier", and split it into two parts along the .
:
eg. ms-python.python
becomes ms-python
and python
Get a version from "Version History" tab on marketplace.
eg. 2024.17.2024100401
Determine the binary type that you need. Skip this step if this extension is "Universal". Note that some extensions do not support all binary types.
Binary type | targetPlatform |
---|---|
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 |
Combine
https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-python/vsextensions/python/2024.17.2024100401/vspackage?targetPlatform=win32-x64
The ?targetPlatform=win32-x64
part is optional, if your extension is universal.
In Python:
unique_identifier = 'ms-python.python'
version = '2024.17.2024100401'
target_platform = 'win32-x64'
publisher, package = unique_identifier.split('.')
url = (
f'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/{publisher}/vsextensions/{package}/{version}/vspackage'
+ (f'?targetPlatform={target_platform}' if target_platform else ''))
print(url)
There a Chrome extension to add the VSIX download option to the VS Code marketplace
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With