I have installed Visual Studio Code on a machine that is not, and cannot be, connected to the Internet. According to the documentation, I can install an extension from the command line if I have the .vsix
, but I don't know how to get the .vsix
from the marketplace.
How can I download the .vsix
for an extension hosted on the marketplace?
You can now download the extension directly from the marketplace.
As of Visual Studio Code 1.7.1 dragging or opening the extension does not work any more. In order to install it manually you need to:
According to the documentation it is possible to download an extension directly:
An extension's direct download URL is in the form:
https://${publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/${extension name}/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage
This means that in order to download the extension you need to know
You can find all this information in the URL.
Here's an example for downloading an installing the C# v1.3.0 extension:
You can find the publisher and the extension names on the extension's homepage inside its URL:
https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp
Here the publisher is ms-vscode
and the extension name is csharp
.
The version can be found on the right side in the More Info area.
To download it you need to create a link from the template above:
All packages will have the same name Microsoft.VisualStudio.Services.VSIXPackage, so you'll need to rename it after downloading if you want to know what package it was later.
In order to install the extension
*.vsix
extension.vsix
fileExtension was successfully installed. Restart to enable it.