4

I'm trying to install the C/C++ extension for Visual Studio Code, but I can't find it in the extensions list. I'm running Arch Linux, but the extension website says it's crossplatform.

I also tried running ext install ms-vscode.cpptools to no avail.

Any idea why it might be missing/how to get it?

edit: I downloaded the .vsix extension bundle, and manually installed it and it seems to work. Any idea why it was missing in the extensions list?

2 Answers 2

7

Why this happens

This is caused because VS Code is released in two flavors. The base version, known as Code OSS has an open-source license, and the other, known as Visual Studio Code, includes some proprietary Microsoft code, and so it's released under a proprietary license.

Arch Linux's package repository, which only provides open-source software, uses the Code OSS flavor, which is not permitted to access the VS Marketplace due to restrictions placed by Microsoft (see the Arch Wiki)

Solution

Option 1 (recommended): Go to the Marketplace, search for the extension, then click "Version history" and download the latest version. You can then install the .vsix file on VS Code as shown below

How to install VSIX file in VS Code

Option 2 (based on this comment): Install the proprietary version instead by downloading the tar from the VS Code download page, then install it by running pacman -U code-stable-x64-xxxxxxxxxx.tar.gz, replacing the file name with yours of course.

1

Arch Linux disables the VS Marketplace in its version, because it thinks it's not allowed to use it. The marketplace you are seeing is a different one.

The way around this problem is to get VS Code directly from the manufacturer (On Arch, just unpack the tar.gz and run bin/code)

Not the answer you're looking for? Browse other questions tagged or ask your own question.