Need Help

CMake Error at CMakeLists.txt:50 (project):

Visual Studio 15 2017 Win64

could not find any instance of Visual Studio.

I have Visual Studio 15 2017 loaded…

I believe with VS 2017 we dropped the Win64 suffix from the generator name. Instead, you should use -A x64 to choose the 64bit target (which may be the default if it matches the host).

Cc: @brad.king

The Visual Studio 15 2017 generator does support using the Visual Studio 15 2017 Win64 name, but it is documented as for compatibility only. The preferred way to specify the generator is -G "Visual Studio 15 2017" -A x64. Starting with Visual Studio 16 2019 we have no arch suffix on the generator name, but it defaults to the host’s architecture and supports -A for specifying other architectures.

It’s possible that the VS 2017 installer is not reporting the existence of the instance to CMake because it isn’t fully installed.