Vikas Bansal
Vikas Bansal

Reputation: 11790

How to install VS code extension manually?

I am not able to download any extension via VS Code on my office system due to the proxy. Is there a way that I can do it manually by downloading and placing the downloaded files at the right place?

Upvotes: 110

Views: 198301

Answers (5)

afar
afar

Reputation: 165

Two notes when downloading an extension from VScode marketplace:

  1. Version compatibility
    Extensions are updated repeatedly on the marketplace. If you download and transfer it to the target computer, it may not work. One can try to look into version history of the extension and download the older version. But it is not easy to correlate the extension version with VSCode version. You can check the version of the extension on the online computer and try to find a match in the marketplace. But sometimes the older versions are not listed there.

  2. Dependencies
    An extension may have dependencies. When installing from within VSCode, VScode installs the dependencies for you. Good example is the Python extension that requires few other extension like Jupyter and pylance.

To handle these two cases easier:

1- Install the same VSCode version on the online (access to internet) computer as the offline (no access to internet) target computer.

2- From within the VSCode, install the desired extension. It will install the right version and all the dependencies.

3- Find the folder where extensions are installed. On windows, it is in: C:\Users\USER_NAME\.vscode\extensions. On Linux, it is ib ~/.vscode/extensions.

4- Copy and transfer the extensions to the target offline computer, in the extensions folder.

5- Restart the VSCode to see the extensions.

The below screenshot shows all the extensions that I transferred to have the python extension available on the target computer: enter image description here

Upvotes: 6

MarcinKonowalczyk
MarcinKonowalczyk

Reputation: 2788

You can also just drop the extension files into the correct folder. On mac, for example, this is ~/.vscode/extensions/. I'm unsure whether it works for all extensions, but it works just fine for a simple language specification.

Upvotes: 2

HeLin
HeLin

Reputation: 429

Just in case u have a same UI as mine. Happy coding!

enter image description here

Upvotes: 13

U.A
U.A

Reputation: 3383

You can also use the command-line to install extensions from VSIX files using the --install-extension parameter.

code --install-extension /path/to/vsix

eg: code --install-extension vscodevim.vim

Upvotes: 43

Ricardo Mutti
Ricardo Mutti

Reputation: 2969

Download the extension from VSCode marketplace, it'll be a .vsix file, then do like the image below.

Upvotes: 149

Related Questions