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

Cannot find MSVC 2019 build tools if installed with Visual Studio 2022 #695

Closed
ChrisDenton opened this issue Jul 9, 2022 · 0 comments · Fixed by #696
Closed

Cannot find MSVC 2019 build tools if installed with Visual Studio 2022 #695

ChrisDenton opened this issue Jul 9, 2022 · 0 comments · Fixed by #696
Labels
O-windows Windows targets and toolchains

Comments

@ChrisDenton
Copy link
Member

ChrisDenton commented Jul 9, 2022

Reported here: rust-lang/rustup#3024

A brief investigation shows this line to be the problem:

let version_path =
instance_path.join(r"VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt");

If the Visual Studio 2022 does not have the MSVC 2022 build tools then Microsoft.VCToolsVersion.default.txt may be missing. However, if MSVC 2019 is installed Microsoft.VCToolsVersion.v142.default.txt is present. Therefore a possible fix would be to fallback to searching for this and other variations on this file name.

EDIT: This appears to also be broadly true for any version other than latest.

@thomcc thomcc added the O-windows Windows targets and toolchains label Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Windows targets and toolchains
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants