Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unable to determine what CMake generator to use" with msvc2019 #900

Closed
dhrdlicka opened this issue Nov 11, 2019 · 4 comments
Closed

"Unable to determine what CMake generator to use" with msvc2019 #900

dhrdlicka opened this issue Nov 11, 2019 · 4 comments
Labels
bug a bug in the product Feature: kits fixed (release pending) fixed in pre-release and is pending official release

Comments

@dhrdlicka
Copy link

dhrdlicka commented Nov 11, 2019

Brief Issue Summary

Configuring a project with a Visual Studio toolchain fails with Unable to determine what CMake generator to use. Please install or configure a preferred generator, or update settings.json, your Kit configuration or PATH variable. Error: No usable generator found.

CMake Tools Log

2019-11-11T17:41:40.151Z [debug] [main] Starting new CMake driver
2019-11-11T17:41:40.152Z [debug] [main] Starting CMake driver
2019-11-11T17:41:40.152Z [debug] [driver] CMakeDriver Kit set to Visual Studio Community 2019 Release - amd64_x86
2019-11-11T17:41:47.976Z [debug] [kit] OK running C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat amd64_x86, env vars: undefined
2019-11-11T17:41:47.976Z [debug] [driver] Trying to detect generator supported by system
2019-11-11T17:41:47.992Z [debug] [driver] Command version test return code ENOENT
2019-11-11T17:41:48.009Z [debug] [driver] Command version test return code ENOENT
2019-11-11T17:41:48.026Z [debug] [driver] Command version test return code ENOENT
2019-11-11T17:41:48.027Z [debug] [driver] Run _refreshExpansions
2019-11-11T17:41:48.028Z [debug] [cms-driver] Run doRefreshExpansions
2019-11-11T17:41:48.028Z [debug] [driver] Run _refreshExpansions cb
2019-11-11T17:41:48.030Z [error] [main] Unable to determine what CMake generator to use. Please install or configure a preferred generator, or update settings.json, your Kit configuration or PATH variable. Error: No usable generator found.
2019-11-11T17:41:48.031Z [debug] [extension] [5942] cmake.configure finished (returned -1)
2019-11-11T17:43:56.288Z [debug] [extension] Deactivate CMakeTools

Platform and Versions

  • Operating System: Windows 10 x64, build 19018.1
  • CMake Version: 3.15.5
  • VSCode Version: 1.40.0
  • CMake Tools Extension Version: 1.2.1
  • Compiler/Toolchain: Visual Studio Community 2019 v16.3.8, MSVC v142 x64/x86 build tools (v14.23)
@bobbrow
Copy link
Member

bobbrow commented Nov 11, 2019

This is a duplicate of #880. We plan to release a patch very soon.

@bobbrow bobbrow closed this as completed Nov 11, 2019
@bobbrow
Copy link
Member

bobbrow commented Nov 11, 2019

I was wrong. This is actually a problem with VS 2019. I have a fix.

@bobbrow
Copy link
Member

bobbrow commented Nov 11, 2019

You should be able to work around the issue by setting the cmake.generator setting to "Visual Studio 16 2019".

After the fix is released, you'll need to rescan kits.

@bobbrow bobbrow added bug a bug in the product Feature: kits fixed (release pending) fixed in pre-release and is pending official release labels Nov 12, 2019
@bobbrow
Copy link
Member

bobbrow commented Nov 13, 2019

1.2.2 was released today. Please give that a try and let us know if you continue to have issues. You'll want to rescan for kits.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product Feature: kits fixed (release pending) fixed in pre-release and is pending official release
Projects
None yet
Development

No branches or pull requests

3 participants