Jamshed Salik
Jamshed Salik

Reputation: 29

cmake project not seen in visual studio 2017

I download the visual studio 2017 but Cmake Executable Template is not show when I created new project. Downloading time CMake project not seen in visual studio 2017' Cmake is not seen

Upvotes: 0

Views: 1414

Answers (2)

sjmemohannah
sjmemohannah

Reputation: 11

In case you are trying to update an non-CMake project to an CMake project and the VS automatism isn't detecting it right:

Make sure that I reload the project through the solution explorer OR delete the .vs-folder in the project root directory.

I experienced sometimes VS being unable to detect the given project as an possible CMake project. If you then open the folder where the root CMakeLists.txt is located, you should be able to use the CMake automatism as expected.

I answer this here, because it has been questioned for example in Reddit or so.

Maybe it will help someone.

Upvotes: 0

ComicSansMS
ComicSansMS

Reputation: 54737

This is not how CMake support in Visual Studio works.

Visual Studio does not provide a "New Project" wizard for CMake. Instead, you manually create a folder with a (potentially empty) CMakeLists.txt file, which you can then load into Visual Studio via

File->Open->CMake...

Open CMake option in File menu

Once opened, you can edit your CMakeLists.txt from within Visual Studio.

Upvotes: 0

Related Questions