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

Closed
eduardoarandah opened this issue Aug 21, 2019 · 8 comments
Closed

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

eduardoarandah opened this issue Aug 21, 2019 · 8 comments

Comments

@eduardoarandah
Copy link

Problem

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 install.py --clang-completer --ts-completer
didn't work

imagen

Debugging

I installed "visual studio locator"
https://chocolatey.org/packages/vswhere

And gave me this (check the version)
imagen

How the problem was solved

I added the version to the command and it worked!

python install.py --clang-completer --ts-completer --msvc=15

Versions:

  • Windows 10 with python3
  • Gvim 8.1 compiled with python3

Pending

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

imagen

@puremourning
Copy link
Member

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.

@steelworks
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.

@ghost
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.

@btrepp
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 https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16# and selecting the VC++ seems to progress it.

@bstaletic
Copy link
Collaborator

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

@btrepp
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 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):
  Generator

    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.

The error message it generates talks about 2019.

@bstaletic
Copy link
Collaborator

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

@keyone78
Copy link

image

@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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants