26

When I try to install any extension in Visual Studio Code (i.e., by pressing Ctrl+P and then running ext install RustyCode), I get a message that No extensions found.

However, this only happens when I run VS Code directly from source repository. I.e., after:

git clone https://github.com/Microsoft/vscode.git
cd vscode
git checkout 1.0.0
scripts/code.sh

But, if I run VS Code from official builds, then I'm able to install extensions.

So, how can I enable downloading and installing extensions from Visual Studio Marketplace when I run VS Code directly from source repository? (Is Visual Studio Marketplace integration bundled separately in official builds?)

I'm on Ubuntu/Linux.

Vikrant Chaudhary
  • 11,089
  • 10
  • 53
  • 68

5 Answers5

52

This can be fixed by adding following to product.json:

"extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
    "itemUrl": "https://marketplace.visualstudio.com/items"
}

(This is can also be fixed by copying product.json from an official build (in the .zip archvie, product.json is under resources/app) which contains above lines).

More information: https://github.com/Microsoft/vscode/issues/1557

Vikrant Chaudhary
  • 11,089
  • 10
  • 53
  • 68
  • 2
    Thank you for this – Malachi May 16 '16 at 23:34
  • Where I should add this `product.json`? On `./build/electron/resources/app`? – Evandro Coan Jul 20 '17 at 16:28
  • 1
    There is already a `product.json` in the root directory of the repository. This goes into that. – Vikrant Chaudhary Jul 21 '17 at 09:47
  • 2
    My `product.json` contains these lines, yet not working :( – openwonk Sep 04 '18 at 18:58
  • 3
    There may be a server down somewhere... I've tried on two different computers to search extensions... "No extensions found." – openwonk Sep 04 '18 at 19:07
  • 3
    Just confirmed per [marketplace.visualstudio.com](https://marketplace.visualstudio.com/) that "Sorry! Our services aren't available right now. We're working to restore all services as quickly as possible. Please check back soon." If someone encounters this question in the future, check website first if services are available... Will save you time from configuring files / reinstalling software. – openwonk Sep 04 '18 at 23:05
  • Is it possible to configure the extension repository in a pre-built VSCode OSS? – raindev Feb 04 '21 at 22:28
  • On linux look for `/usr/lib/code/product.json` – jhau Feb 20 '21 at 15:16
7

You can use code-marketplace extension in AUR to add microsoft marketplace registery in code OSS. This extension will installs a pacman hook that patches the file on every package update.

  • 1
    Perfect! This is exactly what I needed, make sure to run `pacman -S code` to let the hook get called if you're not going to update your whole system. – SeedyROM Jun 26 '21 at 23:22
4

If you want to do the same for archlinux, have a look here => https://wiki.archlinux.org/index.php/Visual_Studio_Code , you have various possible options to solve the problem.

antham
  • 408
  • 4
  • 15
2

For Arch linux you could access the product.json file under this path - /usr/lib/code/product.json. Just edit on the file the extensionsGallery with the following-

"extensionsGallery": {
     "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
     "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
     "itemUrl": "https://marketplace.visualstudio.com/items"
}

like @Vikrant Chaudhary said.

Yoel Nisanov
  • 984
  • 7
  • 16
0

Extending the answer from @Vikrant Chaudhary. If anyone wanted to do the same thing on Windows, the path to product.json is here:

Windows path for VSCodium: C:\Program Files\VSCodium\resources\app\product.json

Patrik
  • 107
  • 1
  • 7