When generating Visual Studio solution for Godot: "UnsupportedVersion: Unknown version None"

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Jay2645

Hello!

When running scons -j6 platform=windows vsproj=yes with Visual Studio 2017, I can’t generate a Visual Studio solution.

Compiling normally works just fine. I’m running in the Visual Studio developer command prompt.

scons -j6 platform=windows vsproj=yes
scons: Reading SConscript files ...

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "D:\Documents\Projects\Godot\godot\SConstruct", line 3, in <module>

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "D:\Documents\Projects\Godot\godot\SConstruct", line 63, in <module>
Configuring for Windows: target=debug, bits=default
Found MSVC compiler: x86
Compiled program architecture will be a 32 bit executable. (forcing bits=32).
YASM is necessary for WebM SIMD optimizations.
WebM SIMD optimizations are disabled. Check if your CPU architecture, CPU bits or platform are supported!
UnsupportedVersion: Unknown version None:
  File "D:\Documents\Projects\Godot\godot\SConstruct", line 486:
    methods.generate_vs_project(env, GetOption("num_jobs"))
  File "D:\Documents\Projects\Godot\godot\methods.py", line 555:
    batch_file = find_visual_c_batch_file(env)
  File "D:\Documents\Projects\Godot\godot\methods.py", line 541:
    return find_batch_file(env, version, host_platform, target_platform)[0]
  File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\scons\SCons\Tool\MSCommon\vc.py", line 308:
    pdir = find_vc_pdir(msvc_version)
  File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\scons\SCons\Tool\MSCommon\vc.py", line 271:
    raise UnsupportedVersion("Unknown version %s" % msvc_version)

SCons is up to date:

scons --version
SCons by Steven Knight et al.:
        script: v3.0.3.27552f9e8d59c13c3567f2bd380b74e34ee25324, 2019-01-08 02:59:02, by bdbaddog on hpmicrodog
        engine: v3.0.3.27552f9e8d59c13c3567f2bd380b74e34ee25324, 2019-01-08 02:59:02, by bdbaddog on hpmicrodog
        engine path: ['c:\\program files (x86)\\microsoft visual studio\\shared\\python36_64\\lib\\site-packages\\scons\\SCons']
Copyright (c) 2001 - 2019 The SCons Foundation

I know in the past SCons had issue with Visual Studio 2017 – is that still the case? Is there any other way to generate a solution file which will work in Visual Studio 2017?

Thanks!

:bust_in_silhouette: Reply From: Calinou

There are ongoing issues with using SCons 3.0.3 + Visual Studio with Godot, so you should probably downgrade to SCons 3.0.1 for now.

Downgrading fixed it. Thank you!

Jay2645 | 2019-01-11 22:11