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

Visual C++ Support may not reliably detect MSVC #929

Open
azuo opened this issue Nov 2, 2024 · 1 comment
Open

Visual C++ Support may not reliably detect MSVC #929

azuo opened this issue Nov 2, 2024 · 1 comment

Comments

@azuo
Copy link

azuo commented Nov 2, 2024

Currently, org.eclipse.cdt.internal.msw.build.VSInstallationRegistry detects the VS installation path using the following command line:

vswhere -version [m,n] -property installationPath

However, this may not be perfect in some cases - for example, it will ignore a tools-only installation with MSBuild + VC but no IDE. (but instead unnecessarily detect a VS installation without VC?)

Referring to https://github.com/microsoft/vswhere/wiki/Find-VC, is it more reliable to switch to the following command line?

vswhere -version [m,n] -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath

Or, more generally:

vswhere -version [m,n] -products * -requires Microsoft.VisualStudio.Component.VC.Tools.* -property installationPath
@MarkZ3
Copy link
Contributor

MarkZ3 commented Nov 2, 2024

This makes sense. I would say sticking to x86.x64 for now since the plugin doesn't support other targets (there is no mechanism to select something else). If you make a MR I will test it.

azuo added a commit to azuo/cdt that referenced this issue Nov 2, 2024
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