-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Verification
- I searched for recent similar issues at https://github.com/rust-lang/rustup/issues?q=is%3Aissue and found no duplicates.
- I am on the latest version of Rustup according to https://github.com/rust-lang/rustup/tags and am still able to reproduce my issue.
Problem
On this page of the rustup handbook, there is a description of the minimum requirements necessary to make rustup-init.exe not complain about a missing MSVC installation. Quoting the manual, the minimal requirements are as follows:
- MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)
- Windows 11 SDK (10.0.22621.0)
I already had an installation of Visual Studio Community 2022, that came with the installation of Unity3D, so I opted to modify it in the installer. In the modification, I chose those the exact two packages as above. However, after the installation was complete, I was still greeted by the following message when starting rustup-init.exe:
Rust requires the Microsoft C++ build tools for Visual Studio 2017 or later, but they don't seem to be installed.
I tried installing several other components, among which the Universal C Runtime, all without result. The only thing that worked, was exactly what I was trying to prevent: installing the "Desktop development with C++" workload, which installs a whole bunch of stuff that I don't need and therefore wastes several GBs and some time.
Steps
- Install Visual Studio Community 2022 (just to be sure, via a Unity3D installation)
- After it is done, modify the installation via the Visual Studio Installer to include the minimal individual components as indicated here, which are:
MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest),Windows 11 SDK (10.0.22621.0) - Download and run
rustup-init.exe. It will tell you:Rust requires the Microsoft C++ build tools for Visual Studio 2017 or later, but they don't seem to be installed. - Now go back to the Visual Studio Installer, modify the installation, and select the "Desktop development with C++" workload, then commence.
- When the installer is done, start
rustup-init.exeagain. It will no longer complain about missing build tools.
Possible Solution(s)
If reproducible by others, it would be nice if this suggestion of the manual was either removed due to incorrectness, or updated with the actual minimal set of components and actions necessary to make rustup-init.exe detect the tools that it needs, to prevent future time wasting. Furthermore, it would be nice to be able to more easily find how exactly rustup-init.exe goes about detecting these tools, as this information has been exceedingly hard to find and would help a lot with troubleshooting installation issues - perhaps this could be included in the handbook?
Notes
I also tried to install 2017 versions of the toolchain as the message suggests (so MSVC v141 - VS 2017 C++ x64/x86 build tools (v14.16)), same result.
Rustup version
rustup-init 1.28.2 (e4f3ad6f8 2025-04-28)Installed toolchains
MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest), Windows 11 SDK (10.0.22621.0)OS version
Windows 11 (10.0.26200 Build 26200)