Linux – Visual Studio Code on Linux 32-bits

linuxvisual studio

Microsoft launched the Visual Studio Code versions for Linux and Mac, but the documentation is a little poor.

I downloaded the Linux version (which is a binary) and when I came to run the program, I had this error:

-bash: ./Code: cannot execute binary file: Error in exec format

I think it's because the program is for 64-bit versions only but I can possibly be wrong. I didn't found anything in the docs so, did I miss something? Anybody already made it or know what is happening?

Best Answer

The official build ships with a 64 bits version of electron, but you can install a 32 bits version on your system and use it to run visual studio code.

Install electron with:

npm install electron-prebuilt -g

Then run:

electron PATH_TO_VSCODE/resources/app

You may also need to install a version of Mono >= 3.0.12 if you want VSCode to run the OmniSharp server (this is what gives code completion, refactoring, ... for C# projects).

This solution worked for me, except that I can't find dnx commands in the command palette.

(edit: added note about mono)

Related Question