VS 2017 - could not create a named generator Visual Studio

• May 23, 2021 - 01:29

My VS 2019 doesn't seem able to open/create C++ projects at all (not a MuseScore problem, trying to solve separately) so I've tried VS 2017. It opens the folder fine but I get

Error CMake Error: Could not create named generator Visual Studio 16 2019 Win64

in the "Error List" tab.

Which doesn't make much sense as I'm using VS 2017...there are some hits online for that error but they don't seem to be helping much.
Any clues?


I tried changing the references to VS 16 2019 in various files to VS 15 2017 and now I get an error on "cmake_minimum_required(VERSION 3.16)".

So it seems the current source does in fact no longer build under VS 2017?

If we have have multiple source files in src directory then in that case what parameter should we pass in the add_executables command ?

In reply to by riadbouzit10

I truly hope you're not trying to build the current sources with VS 2017. As mentioned above, that is simply not supported.

And even when building our sources you normally shouldn't be making this type of change to the cmakelists. Anyhow, check the cmake documentation: add_executable (no s) likely needs a target name and as such has no direct relation on which source files you have.

Do you still have an unanswered question? Please log in first to post your question.