This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

VS Code: Unable to determine what CMake generator to use.

When I create a new project from samples in VS Code I get this error
[variant] Loaded new set of variants
[kit] Successfully loaded 9 kits from C:\Users\Andrea\AppData\Local\CMakeTools\cmake-tools-kits.json
[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.
[main] Configuring folder: hello_world
[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.
How can I fix it?
Parents
  • Hi Andrea,

    You might not be using the proper cmake when you are trying to create a new project from sample. The cmake that you should be using is located inside the toolchain folder of your NCS installation directory. 
    If you go to the VS Code extensions, find nRF Connect for VS Code, right click and choose Extension Settings. There you should see Nrf-connect>Toolchain:Path. If you are using NCS 1.8, it should be $(workspaceFolder:v1.8.0). 
    In case abovementioned looks OK, and you still have a problem, I would suggest that you reinstall the Toolchain Manager.

    You can test which toolchain path you are using by making a new freestanding application. You should see the Toolchain path under nRF Connect Toolchain.

    Best regards,
    Dejan

Reply
  • Hi Andrea,

    You might not be using the proper cmake when you are trying to create a new project from sample. The cmake that you should be using is located inside the toolchain folder of your NCS installation directory. 
    If you go to the VS Code extensions, find nRF Connect for VS Code, right click and choose Extension Settings. There you should see Nrf-connect>Toolchain:Path. If you are using NCS 1.8, it should be $(workspaceFolder:v1.8.0). 
    In case abovementioned looks OK, and you still have a problem, I would suggest that you reinstall the Toolchain Manager.

    You can test which toolchain path you are using by making a new freestanding application. You should see the Toolchain path under nRF Connect Toolchain.

    Best regards,
    Dejan

Children
No Data
Related