I installed VS2019, selecting the workloads and modules that I wanted, but I ignored the installer request to reboot at the end, as I assumed that shutting down my computer at the end of the day and restarting it the following day would suffice. I was wrong.
The following day, I tried a cmake build and I got the "could not find any instance of Visual Studio" error. After several efforts to resolve, I went back into the Visual Studio installer and clicked Modify, despite having not changed the configuration - it took a long time to reboot the computer, after which cmake worked as required.
CMake must be doing something to want the 2019 build tools.
C:\Users\Beau\.vim\pack\plugins\start\YouCompleteMe>python install.py --rust-completer
Searching Python 3.7 libraries...
Found Python library: C:\Python37\libs\python37.lib
Found Python headers folder: C:\Python37\Include
CMake Error at CMakeLists.txt:26 (project):
Visual Studio 16 2019
could not find any instance of Visual Studio.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Beau/AppData/Local/Temp/ycm_build_bgbzwsrr/CMakeFiles/CMakeOutput.log".
ERROR: the build failed.
NOTE: it is *highly* unlikely that this is a bug but rather
that this is a problem with the configuration of your system
or a missing dependency. Please carefully read CONTRIBUTING.md
and if you're sure that it is a bug, please raise an issue on the
issue tracker, including the entire output of this script
and the invocation line used to run it.