-
Notifications
You must be signed in to change notification settings - Fork 459
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
Support finding Visual Studio instances using vswhere.exe #597
Support finding Visual Studio instances using vswhere.exe #597
Conversation
Thanks! This seems reasonable enough to me to go ahead and land. AFAIK this is one of the last remaining blocks running rustc on aarch64 Windows itself, right? It looks like CI says the msrv needs bumping, but that's fine to do, you'll just need to edit the CI configuration |
Sorry for the late reply, I missed the notification 😬 I've changed the usage of This is not really a block for running |
Hmm, rustup (Install Rust stage) failed with |
I think it may be related to a recent rustup bug? Mind adding a |
Let's see if that helps :) |
OMG. Another try? 🙃 |
Thanks again! |
Thank you! 🙂 |
@alexcrichton How do I know if this is in the latest crate that @Alovchin91 We may eventually need to do this to actually find the path where
|
According to the vswhere wiki:
So apparently this location is guaranteed for vswhere even if other components are installed elsewhere. |
That's the current thinking indeed. I intentionally KISSed and did not introduce unnecessary complexity since Microsoft promises to maintain the said path in the foreseeable future. If it ever changes, we might indeed want to reconsider. But for now vswhere.exe is the last resort and to be honest, I really hope that Microsoft fixes the COM component on ARM64. At least it's my impression from talking to them on Twitter that they could fix it (though I guess nobody knows when that would happen 🙈). |
This was published in 1.0.68, so if your |
This PR adds another option in attempting to find an installed Visual Studio version by using vswhere.exe.
vswhere.exe has a known location (
%ProgramFiles(x86)%\Microsoft Visual Studio\Installer
) and is a 32-bit application which means it can be used on Windows ARM64 to locate Visual Studio (see rust-lang/rust#83043).vswhere.exe is used as a last resort to find VS2015+ if everything else has failed. vswhere.exe itself is launched with parameters to search for only the latest available version that has component
Microsoft.VisualStudio.Component.VC.Tools.<ARCH>
installed.