Installing Microsoft Visual Studio Code on Fedora Linux

I never thought I’d ever say this, but I must admit that I have become quite a fan of Microsoft’s Visual Studio Code IDE, which is available for a wide range of platforms, including Linux.

However, the installation user experience was still somewhat arcane – one had to manually download the RPM package from their web site to install the software. Once a new version was available, the user receives a notification within the application, which redirects him to the website for downloading and updating the latest RPM manually again.

Therefore it didn’t take long for the community to request the creation of a dedicated yum repository, to keep the package updated automatically.

This issue has now been resolved: a yum repo has now been created. Until github issue 20895 has been fixed, this still requires setting up the required repository configuration manually though, but hopefully this will be addressed soon as well.

Until then, here’s how to enable the yum repo on Fedora Linux (Fedora 25 in my case):

Create a file /etc/yum.repos.d/vscode.repo with the following content:

[code]
name=Visual Studio Code
baseurl=https://packages.microsoft.com/yumrepos/vscode
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc

Now you can install the package with the following command:

$ sudo dnf install code

Upon the first run, you will be requested to import the GPG build key used for signing the package.

Once a new updates becomes available, running dnf update will pull and install the updated package automatically.

Thanks to the developers at Microsoft for making this step much easier now!

4 replies on “Installing Microsoft Visual Studio Code on Fedora Linux”

    1. Please note that this is about Visual Studio Code, which is a different beast 😉

  1. Error: package code-1.10.0-1488387854.el7.x86_64.rpm isn’t signed – seems like i have to wait a little 🙂

    1. Hmm, that’s odd. I ran “dnf update” earlier today, and this is what I got:

      rpm -qi code
      Name : code
      Version : 1.10.0
      Release : 1488387854.el7
      Architecture: x86_64
      Install Date: Thu 02 Mar 2017 10:32:23 AM CET
      Group : Development/Tools
      Size : 157249812
      License : Multiple, see https://code.visualstudio.com/license
      Signature : RSA/SHA256, Wed 01 Mar 2017 10:57:41 PM CET, Key ID eb3e94adbe1229cf
      Source RPM : code-1.10.0-1488387854.el7.src.rpm
      Build Date : Wed 01 Mar 2017 06:12:15 PM CET
      Build Host : c432a008bc20
      Relocations : (not relocatable)
      Packager : Visual Studio Code Team vscode-linux@microsoft.com
      Vendor : Microsoft Corporation
      URL : https://code.visualstudio.com/
      Summary : Code editing. Redefined.
      Description :
      Visual Studio Code is a new choice of tool that combines the simplicity of a code editor with what developers need for the core edit-build-debug cycle. See https://code.visualstudio.com/docs/setup/linux for installation instructions and FAQ

Comments are closed.