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

vswhere does not find the vs 2017 C compiler installed by VS 2019 installer #217

Closed
PerMildner opened this issue Mar 30, 2020 · 5 comments
Closed
Labels

Comments

@PerMildner
Copy link

PerMildner commented Mar 30, 2020

I install VS 2019 and select "MSVC v140 - VS 2015 C++ build tools (v14.00)" and "MSVC v141 - VS 2017 C++ x64/x86 build tools (v14.16)" to have it install the older VS 2015 and VS 2017 C compilers but I cannot get vswhere to find the VS 2017 installation so I can run its vcvarsall.bat.

I think that the VS 2017 C compiler is installed, e.g. C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.exe exists, but I do not know how to find it (or, what I really want, how to set up the environment with its vcvarsall.bat or similar).

Also, in the "Start" menu there are command prompts for VS 2019 and for VS 2015 but none for VS 2017.

Any ideas?

Example outputs from vswhere:

Microsoft Windows [Version 10.0.18363.720]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\spdev>cd Downloads

C:\Users\spdev\Downloads>.\vswhere -all -legacy -property installationPath
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional
C:\Program Files (x86)\Microsoft Visual Studio 14.0\
C:\Users\spdev\Downloads>.\vswhere -all -legacy
Visual Studio Locator version 2.8.4+ff0de50053 [query version 2.3.2200.14893]
Copyright (C) Microsoft Corporation. All rights reserved.

instanceId: 767fb0f8
installDate: 3/23/2020 2:23:43 PM
installationName: VisualStudio/16.5.0+29911.84
installationPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional
installationVersion: 16.5.29911.84
productId: Microsoft.VisualStudio.Product.Professional
productPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe
state: 4294967295
isComplete: 1
isLaunchable: 1
isPrerelease: 0
isRebootRequired: 0
displayName: Visual Studio Professional 2019
description: Professional IDE best suited to small teams
channelId: VisualStudio.16.Release
channelUri: https://aka.ms/vs/16/release/channel
enginePath: C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service
releaseNotes: https://go.microsoft.com/fwlink/?LinkId=660893#16.5.0
thirdPartyNotices: https://go.microsoft.com/fwlink/?LinkId=660909
updateDate: 2020-03-23T13:23:43.3998245Z
catalog_buildBranch: d16.5
catalog_buildVersion: 16.5.29911.84
catalog_id: VisualStudio/16.5.0+29911.84
catalog_localBuild: build-lab
catalog_manifestName: VisualStudio
catalog_manifestType: installer
catalog_productDisplayVersion: 16.5.0
catalog_productLine: Dev16
catalog_productLineVersion: 2019
catalog_productMilestone: RTW
catalog_productMilestoneIsPreRelease: False
catalog_productName: Visual Studio
catalog_productPatchVersion: 0
catalog_productPreReleaseMilestoneSuffix: 6.0
catalog_productSemanticVersion: 16.5.0+29911.84
catalog_requiredEngineVersion: 2.5.2139.10695
properties_campaignId:
properties_channelManifestId: VisualStudio.16.Release/16.5.0+29911.84
properties_nickname:
properties_setupEngineFilePath: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installershell.exe

instanceId: VisualStudio.14.0
installationPath: C:\Program Files (x86)\Microsoft Visual Studio 14.0\
installationVersion: 14.0

C:\Users\spdev\Downloads>
@PerMildner
Copy link
Author

I could do "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=14.16 with the VS 2019 version of vcvarsall.bat but that will not work if the full VS 2017 has been installed (and the VS 2019 has been installed, but not its version of the VS 2017 tools), but that kind of detailed knowledge of the installation details kind of defeats the purpose of vswhere.

@heaths
Copy link
Member

heaths commented Mar 30, 2020

The compiler tools are a feature in VS2019 and not a product themselves. Please open an issue against the Visual C++ compiler team on https://developercommunity.visualstudio.com to help with how to find it, if the instructions in our wiki are not working.

@PerMildner
Copy link
Author

PerMildner commented Mar 30, 2020

Thanks.

A surprising thing is that vswhere does give me the location of the VS 2015 tools that were also installed as part of VS 2019.

In either case, it would be useful to be able to locate e.g. the VS 2017 C tools without knowing which VS version (VS 2017, VS 2019, VS 2021?, ...) installed it, and vswhere seems the obvious tool for providing that information.

@heaths
Copy link
Member

heaths commented Mar 30, 2020

vswhere is for finding VS and other products. Features within those products are up to the feature teams to support. For VS2019 the VC team made a version-compatible way of finding it for future toolsets they should maintain. That doesn't apply to older versions.

Please work with the VC++ team on how to properly locate older versions. See our wiki as well since I wrote some examples based on their recommendations.

@PerMildner
Copy link
Author

OK, thanks. I guess I am confused about where the different responsibilities lie. I'll try to contact the VC++ team.

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

No branches or pull requests

2 participants