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

could not find any instance of Visual Studio. (solved) #3472

eduardoarandah opened this issue Aug 21, 2019 · 8 comments

could not find any instance of Visual Studio. (solved) #3472

eduardoarandah opened this issue Aug 21, 2019 · 8 comments


Copy link


Compiling on windows returns "could not find any instance of Visual Studio"

What I did

I followed instructions, downloading visual studio and checking "visual c++ build tools"
Product was also activated via "login to microsoft"

Command: python --clang-completer --ts-completer
didn't work



I installed "visual studio locator"

And gave me this (check the version)

How the problem was solved

I added the version to the command and it worked!

python --clang-completer --ts-completer --msvc=15


  • Windows 10 with python3
  • Gvim 8.1 compiled with python3


Somehow the installer couldn't find visual studio, even when it's installed in the usual location

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build


Copy link

Thanks for posting but the —msvc flag is documented in the installation guide and so I don’t really see that there’s anything to fix here. If there is it’s a cmake issue surely.

Copy link

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.

Copy link

ghost commented Jan 21, 2020

I have been searching for the fix the entire day and NOW I land on this page.

FINALLY!! All problems solved.

Thank you very much for the post.

Copy link

btrepp commented Jan 23, 2020

Hi all. This seems to be related that the docs say 2017 and link to 2017, but you do need the 2019 build tools from and selecting the VC++ seems to progress it.

Copy link

You definitely don't need VS 2019, since our CI runs 2015, 2017 and 2019.

Copy link

btrepp commented Jan 23, 2020

CMake must be doing something to want the 2019 build tools.

C:\Users\Beau\.vim\pack\plugins\start\YouCompleteMe>python --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
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.

The error message it generates talks about 2019.

Copy link

You didn't use the --msvc flag, so cmake guessed wrong.

Copy link


@ycm-core ycm-core locked and limited conversation to collaborators Jun 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
None yet

No branches or pull requests

6 participants