Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I download .vsix files now that the Visual Studio Code Marketplace no longer supplies them in-browser? [closed]

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?

like image 308
BreakfastScience Avatar asked Sep 04 '25 04:09

BreakfastScience


2 Answers

You can construct the .vsix download URL by hand.

  1. Get extension's "Unique Identifier", and split it into two parts along the .:

    eg. ms-python.python becomes ms-python and python

  2. Get a version from "Version History" tab on marketplace.

    eg. 2024.17.2024100401

  3. 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
  4. 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)
like image 193
twj Avatar answered Sep 07 '25 18:09

twj


There a Chrome extension to add the VSIX download option to the VS Code marketplace

like image 44
Harry Avatar answered Sep 07 '25 18:09

Harry



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!