'unable to determine what cmake generator to use-VS Code-Windows 10

while compiling cpp files in vs code in windows 10 PC, after giving "cmake:debug" I get error like this "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" how to solve the error



Solution 1:[1]

If you have install cmake, setted up your project and you added it's path, try this Ctrl+shift+P and Type "cmake:reset cmake tools for extension state" and press enter.

At least that works for me.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1