visual studio 2017 vsproj=yes did not work

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By oob
:warning: Old Version Published before Godot 3 was released.

While compiling godot source code (2.12stable) using scons p=windows vsproj=yes,I got

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly

Actually there’s no problem to compile the source code (with scons p=windows), just not work for the vsproj=yes option,I want to create a Visual Studio solution.

So how?

(win7 32bit vs2017community)

Visual Studio 2017 is not supported in Godot yet. In the meantime, you can install the Visual C++ 2015 Build Tools which are smaller than the full Visual Studio IDE.

Calinou | 2017-03-19 11:38

Yes,tried with Visual C++ 2015 Build Tools I got a Visual Studio solution,but I still need vs2015 to properly open it.Anyway,thanks!

oob | 2017-03-19 14:34

python -m pip install scons (be sure to check ‘add python to PATH’ when installing python 3.11+ for windows)
This works fine now with godot 3.5.1 if you run vcvars64.bat or run inside the Command Prompt for VS2017
(C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat)

jpate | 2023-03-10 18:11

:bust_in_silhouette: Reply From: Benjamin

The current release of SCons doesn’t support Visual Studio 2017 properly, which is why this happens. However, support has been added to the repository, there simply hasn’t been an official release since then.

This means that you can build a VS 2017 solution for Godot if you install SCons from source, which is pretty simple (though obviously it might not be entirely stable)
Step-by-step instructions, for your convenience:

  1. Install Mercurial source control (used by SCons)
  2. Clone the SCons repository: hg clone
  3. cd to the SCons source directory and build it with scons build/scons (yes, you build SCons using the previously installed SCons)
  4. Install by running python build/scons/ install
  5. The new version will replace the one previously installed, and you should now be able to generate a VS 2017 solution.

== verified working ==

on Windows 7 + Visual Studio Community 2017

using SCons v3.0.0

using Python 2.7.14

using VS 2017 Developer Command Prompt :
scons vsproj=yes platform=windows

Grass H0PEr | 2017-10-09 02:49