'"No extensions found" when running Visual Studio Code from source

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.



Solution 1:[1]

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

Solution 2:[2]

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.

Solution 3:[3]

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.

Solution 4:[4]

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.

Solution 5:[5]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Vikrant Chaudhary
Solution 2 antham
Solution 3 Valentin Nasraty
Solution 4
Solution 5 Patrik