29

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.

5 Answers 5

55

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

Sign up to request clarification or add additional context in comments.

7 Comments

Where I should add this product.json? On ./build/electron/resources/app?
There is already a product.json in the root directory of the repository. This goes into that.
My product.json contains these lines, yet not working :(
There may be a server down somewhere... I've tried on two different computers to search extensions... "No extensions found."
Just confirmed per 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.
|
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 Comment

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.
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.

Comments

3

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.

Comments

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.