admin管理员组文章数量:1321605
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?
EDIT:
The selected answer is very helpful, as it allows a user to create any version of a desired extension directly from source - though I cannot speak for it as I have not tried it. However, my problem was solved by updating the VS Code installation on an internet-connected machine to v1.96. I was personally using v1.94 and this was my problem, as the download option was not yet available in my version (as mentioned in the first link I posted, d'oh).
As I understand it, the only "official" way Microsoft wants users to obtain .vsix files is to get them from the extensions store via an installed copy of VS Code, as mentioned in the earlier link.
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?
EDIT:
The selected answer is very helpful, as it allows a user to create any version of a desired extension directly from source - though I cannot speak for it as I have not tried it. However, my problem was solved by updating the VS Code installation on an internet-connected machine to v1.96. I was personally using v1.94 and this was my problem, as the download option was not yet available in my version (as mentioned in the first link I posted, d'oh).
As I understand it, the only "official" way Microsoft wants users to obtain .vsix files is to get them from the extensions store via an installed copy of VS Code, as mentioned in the earlier link.
Share Improve this question edited Feb 26 at 4:54 BreakfastScience asked Jan 15 at 22:43 BreakfastScienceBreakfastScience 831 silver badge6 bronze badges 6- 1 The official instructions work fine for me, though I'm using Codium. What happened when you tried it? What version of VSCode are you using? – wjandrea Commented Jan 15 at 22:50
- What other instructions did you try exactly, and what was the outcome? – wjandrea Commented Jan 15 at 22:50
- 4 But I do see the "download" button is missing from the website – wjandrea Commented Jan 15 at 22:51
- 1 With the specific example of "autoDocstring - Python Docstring Generator", right-clicking on the result within VSCode gives me the option to "Install Specific Version...", "Copy", "Copy extension ID", and "Add to Workspace Recommendations", but no option to "Download vsix" as the official instructions say. I'm using VSCode 1.94.1 – BreakfastScience Commented Jan 15 at 23:01
- 1 I thought I went blind, but the download button really is gone from the marketplace website... Seems intentional and is totally in line with MS's "drop feature silently" behavior. – jake_asks_short_questions Commented Jan 16 at 14:05
3 Answers
Reset to default 5Please 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
- Click on the extension repository on the page of the extension product on Visual Studio Marketplace.
- Clone or download the extension code to your local directory.
- In your local directory with the copy of the product, run command:
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 have node.js
, npm
and installed vsce
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 find data/extension
in the VSCode installation directory, a sibling directory to bin
. Inside data/extension
directory, you can locate the directory of the extension you need and run vsce package
.
Did something change? Is Microsoft no longer allowing .vsix downloads directly?
Yes. Simply put, that was the change. The download links are no longer displayed in extension pages. But they still "exist", and they still function if you know how to get them, which you can find in the answers to the question you already linked- How can I install Visual Studio Code extensions offline?, such as my answer there.
To me this simple bookmark trick worked for me... Create a bookmark and as address paste the following code. Then visit the marketplace page of extension you want to download, and click the created bookmark. It should open a save as window for the .vsix file.
javascript:(function()%7Bconst%20URL_VSIX_PATTERN%20%3D%20'https%3A%2F%2Fmarketplace.visualstudio%2F_apis%2Fpublic%2Fgallery%2Fpublishers%2F%24%7Bpublisher%7D%2Fvsextensions%2F%24%7Bextension%7D%2F%24%7Bversion%7D%2Fvspackage'%3B%0A%0Alet%20itemName%20%3D%20new%20URL(window.location.href).searchParams.get('itemName')%3B%0Alet%20%5Bpublisher%2C%20extension%5D%20%3D%20itemName.split('.')%3B%0Alet%20version%20%3D%20document.querySelector('tbody%20tr%20.version-history-container-column').textContent%3B%0A%0Alet%20url%20%3D%20URL_VSIX_PATTERN.replace('%24%7Bpublisher%7D'%2C%20publisher)%0A%09%09%09%09%09%09%20%20.replace('%24%7Bextension%7D'%2C%20extension)%0A%09%09%09%09%09%09%20%20.replace('%24%7Bversion%7D'%2C%20version)%3B%0A%0Awindow.open(url%2C%20'_blank')%3B%7D)()%3B
I'm not the author of this code, credits go to creator.
本文标签:
版权声明:本文标题:How can I manually download .vsix files now that the VS Code Marketplace no longer supplies them in-browser? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742105028a2420978.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论