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.
Reported here: rust-lang/rustup#3024
A brief investigation shows this line to be the problem:
cc-rs/src/windows_registry.rs
Lines 461 to 462 in 53272c5
If the Visual Studio 2022 does not have the MSVC 2022 build tools then
Microsoft.VCToolsVersion.default.txtmay be missing. However, if MSVC 2019 is installedMicrosoft.VCToolsVersion.v142.default.txtis 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.