Build on Windows: "Could not locate Visual Studio" error


#1

I am trying to compile Electron on Windows 7 but I am having problems. (On my Mac it was a breeze… sigh…)

I am following these steps:
http://electron.atom.io/docs/v0.30.0/development/build-instructions-windows/

The link to MS Visual Studio 2013 takes us to MS Visual Studio 2015. So I am using 2015.

When running python script\bootstrap.py -v I get the following error: Could not locate Visual Studio installation

This error is being thrown from electron\vendor\brightray\vendor\gyp\pylib\gyp\MSVSVersion.py, and it seems this is called originally from electron\script\update.py.

I’m running this from the “Developer Command Prompt” that comes w/ MSVS 2015. Python version is 2.7.9.

Has anybody seen this? I have installed multiple versions of MSVS over the years. I looked at the MSVSVersion.py script and I don’t understand why it wouldn’t find a single one of my installations?

Is MS Visual Studio 2015 confirmed to “work” as a replacement for 2013?

To those of you who compile Electron on Windows regularly: what’s your setup? What version of Windows and MSVS do you use?

Thanks.


#2

Unfortunately I’ve never been successful in building Atom or Electron myself on Windows (10). I tried various things I found spread around on several issues with no luck. It’s a shot in the dark, but perhaps you get lucky if you specify which version of MSVS npm should use? To do this execute:

npm config set msvs_version 2015 --global

I wish there was a standalone c++ compiler for Windows that includes all necessary libraries without Visual Studio … as it stands now building on Windows is an incredible painful experience and even if it miraculously works, there are still gigabytes of extra unwanted Visual Studio junk sitting on the hard-drive.


#3

Update: I tried building Electron on a VM that had a relatively clean install of 8.1 (no layers of VS installed over the years) and the result is the same. Same error at the same place.

npm config set msvs_version 2015 --global

I tried that too, didn’t change anything. Thanks anyways.

The fact that this failed in this manner on two completely different machines led me to believe there is something wrong somewhere (it’s not just my weirdly configured laptop).

So I uninstalled MSVS 2015 and put in the 2013 version. And now the build works. phew.

Not sure if '2015 was supposed to work or not so I created an issue to get this resolved: