Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you export the Visual Studio Code extension list?

I need to send all my installed extensions to my colleagues. How can I export them?

The extension manager seems to do nothing... It won't install any extension.

like image 459
Andrew Avatar asked Mar 03 '16 13:03

Andrew


People also ask

How do I export Visual Studio extensions?

If you click Extensions > Manage Extensions > Roaming Extension Manager, you will see the listed roaming Extensions. This feature will provide you with a list displaying all of your extensions installed across all of your environments and allow you to download directly from that list.

How do I export a list of installed vs Code extensions?

The code --list-extensions command exports the list of installed VS Code extensions which we then pipe into xargs, this transforms each extension's name into an extension install command. The output of this command looks like this:

How to export VSC extensions from Visual Studio Code?

Alternatively, open Visual Studio code, press Ctrl + P or Cmd + P and type: Note: Your star to the GitHub repository matters a lot for this contributor, see you there. A text file named vsc-extensions.txt will be created in your project folder which contains all of the exported extensions names.

How to extract the extension names from Visual Studio Code extensions?

Share the extensions.json file and ask another user to add to the .vscode folder. Visual Studio Code will prompt for installation of extensions. I opened the Visual Studio Code extensions folder and executed: That gives you a list from which you can extract the extension names.

How do I view all extensions in Visual Studio Code?

Bring up the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of VS Code or the View: Extensions command (Ctrl+Shift+X). This will show you a list of the most popular VS Code extensions on the VS Code Marketplace.


2 Answers

Automatic

If you are looking forward to an easy one-stop tool to do it for you, I would suggest you to look into the Settings Sync extension.

It will allow

  1. Export of your configuration and extensions
  2. Share it with coworkers and teams. You can update the configuration. Their settings will auto updated.

Manual

  1. Make sure you have the most current version of Visual Studio Code. If you install via a company portal, you might not have the most current version.

  2. On machine A

    Unix:

    code --list-extensions | xargs -L 1 echo code --install-extension 

    Windows (PowerShell, e. g. using Visual Studio Code's integrated Terminal):

    code --list-extensions | % { "code --install-extension $_" } 
  3. Copy and paste the echo output to machine B

    Sample output

    code --install-extension Angular.ng-template code --install-extension DSKWRK.vscode-generate-getter-setter code --install-extension EditorConfig.EditorConfig code --install-extension HookyQR.beautify 

Please make sure you have the code command line installed. For more information, please visit Command Line Interface (CLI).

like image 76
Benny Avatar answered Sep 19 '22 01:09

Benny


I've needed to do this myself a few times - especially when installing on another machine.

Common questions will give you the location of your folder

Visual Studio Code looks for extensions under your extensions folder .vscode/extensions. Depending on your platform it is located:

Windows %USERPROFILE%\.vscode\extensions Mac ~/.vscode/extensions Linux ~/.vscode/extensions 

That should show you a list of the extensions.

I've also had success using Visual Studio Code Settings Sync Extension to sync settings to GitHub gist.

In the latest release of Visual Studio Code (May 2016), it is now possible to list the installed extensions on the command line:

code --list-extensions 
like image 29
MarkP Avatar answered Sep 19 '22 01:09

MarkP