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 a valid MSVC version #1665

Open
Maluscat opened this issue Nov 6, 2022 · 5 comments
Open

Could not find a valid MSVC version #1665

Maluscat opened this issue Nov 6, 2022 · 5 comments

Comments

@Maluscat
Copy link

Maluscat commented Nov 6, 2022

  • OS: Windows 10
  • Visual Studio Build Tools 2019 (MSVC) version: 16.11.20

Hi,

after updating YouCompleteMe and trying to compile it, it no longer detects my MSVC installation as valid and fails (detailed report below).
This seems to have originated in commit 3e9564b, because the script now looks for the MSVC version in the registry, where, for me, it is not found (see below). Rolling back to a commit prior of this one works fine.

Input:

py install.py --ts-completer

Output:

Traceback (most recent call last):
  File "C:\Users\Hallo89\.vim\plugged\YouCompleteMe\third_party\ycmd\build.py", line 1335, in <module>
    Main()
  File "C:\Users\Hallo89\.vim\plugged\YouCompleteMe\third_party\ycmd\build.py", line 1295, in Main
    args = ParseArguments()
           ^^^^^^^^^^^^^^^^
  File "C:\Users\Hallo89\.vim\plugged\YouCompleteMe\third_party\ycmd\build.py", line 556, in ParseArguments
    raise FileNotFoundError( "Could not find a valid MSVC version." )
FileNotFoundError: Could not find a valid MSVC version.

image
Registry entry searched for 17.0, 16.0, 15.0

@puremourning
Copy link
Member

Does it work if you specify --msvc ?

@puremourning
Copy link
Member

puremourning commented Nov 6, 2022

@puremourning
Copy link
Member

@jmarrec do you know why it does not detect the users vs build tools?

@Maluscat
Copy link
Author

Maluscat commented Nov 6, 2022

Does it work if you specify --msvc ?

Indeed it does work (With the command py install.py --ts-completer --msvc 16)! Presumably because this bypasses the automatic MSVC version check implemented in the commit mentioned above.

Also msvc 14 is not supported. 15 is required.

Yes, i just wanted to show that the registry entries which the FindLatestMSVC() function looks for are not present on my machine, despite having it installed. 14 is just a remnant of an old version.
The missing registry entries are the root cause of the problem – I don't know whether this is an issue only on my end and that they should normally be there (Although I never had an issue in that regard, prior to this one), or if it is just something not to be relied upon.

@puremourning
Copy link
Member

I don't know either. I don't windows enough to be too bothered about it though it's sad to have regressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants