I ran into the same error and performed the following steps to resolve the issue:
- Open Visual Studio
- Go to Tools -> Get Tools and Features
- In the “Workloads” tab enable “Desktop development with C++”
- Click Modify at the bottom right
These steps resulted in the “Visual C++ tools for CMake” feature being installed, but the other optional C++ features included in this workload may also helpful for what you are trying to do.
After the Visual Studio updater finishes installing try re-running the command. You may need to open a new command window.