I need to download .vsix versions of some necessary extensions for my coding environment (python, pylance, etc) for an offline machine, but there does not appear to be a way to do so currently.
I’ve tried looking up instructions but even the official instructions appear to be out of date, and so do older responses to similar questions on here on stackoverflow. Did something change? Is Microsoft no longer allowing .vsix downloads directly?
P.S. I tried the old method from the older question and it does download the VSIXPackage as per expected. However this doesn’t seem to be the intended way to download .vsix. What happened?
2
Answers
Found part of the solution! Thanks to @wjandrea for asking my VS Code version. The official instructions mention the need for VS Code 1.96 or greater and I'm on 1.94.1 currently. This explains the current "correct" method part, but I have yet to see a kosher option to download a .vsix of a previous version, or how to properly download .vsix from browser. It seems to be an intentional removal by Microsoft, although a bit of a strange one.
Please see this GitHub recipe.
In older Stackoverflow answers, I saw the examples of Visual Studio Marketplace products with links to the .vsix files of the extensions. I don’t think that these files are presently available unless some author decides to publish one.
Not to worry. If nothing else works, you can easily recreate a .vsix.
To do so, you need to
vsce package
.This way, you can recreate a .vsix version of the package not only for the version presented at the Visual Studio Marketplace but for any earlier release.
To use
vsce
, you need to havenode.js
,npm
and installedvsce
itself. You can find everything in the documentation published, in particular, on the documentation page Publishing Extensions. In your case, you want to use this documentation not for publishing, but only for the creation of a .vsix package. And that package can later be used for alternative ways of installation, for example, off-line.It looks like you are talking about Visual Studio Code extension. If so, you may think of yet another, alternative method of getting the extension product files. It works if you have VSCode with an already installed extension. In this case, you need to locate your VSCode data use the directory
data/extension
. The exact location of this directory depends on the platform and the type of VSCode installation. In particular, if you have a portable VSCode installation, you will finddata/extension
in the VSCode installation directory, a sibling directory tobin
. Insidedata/extension
directory, you can locate the directory of the extension you need and runvsce package
.