How to install Rust (Microsoft C++ build tools) on Windows without MSDN license?

I tried to install the Microsoft C++ build tools from the Visual studio community edition

vs_buildtools__122341934.1634024943.exe --cache --add Microsoft.VisualStudio.Workload.MSBuildTools --add Microsoft.VisualStudio.Component.Windows10SDK.19041 --add Microsoft.VisualStudio.Workload.VCTools --addProductLang En-us

but rustup-init.exe repeats that the build tools are missing, even after opening a new admin console.

My solution is to benefit from my MSDN license and install a full blown Microsoft Visual Studio for C++ development.

This is unsatisfactory for all my colleagues and friends without a MSDN license.

Reading other comments it seams the community edition is enough, so I would like to document the command line.

Hence the question.

Did you install Visual C++ Build Tools as well? Without them, things aren't going to work. They easily take up 10+GBs of memory, though - so if you'd rather save up space, consider using msys2 instead.

rustup-init.exe writes to the console to use the Microsoft Build tools from Microsoft C++ Build Tools - Visual Studio, the same page you mentioned.

The page leads you to download vs_buildtools__122341934.1634024943.exe, as I mentioned.

When you start the exe with GUI, it is unclear what is meant exactly with "C++ build tools".

The Microsoft Build tools command line uses "-add" to add components.
As documented here, the component
Microsoft.VisualStudio.Workload.VCTools
contains
Microsoft.VisualStudio.Component.VC.CoreBuildTools (C++ Build Tools core features)

To answer you question: with the community edition I was only able to install the C++ Build Tools core features.

What am I missing?
Are the core features enough and the rustup-init.exe detection test is wrong?

Not sure about the file that's being downloaded for you, for me it prompts to install the "Visual Studio Installer", which presents the following window. Selecting "desktop development with C++" allows to select and deselect the items that need to be installed - the first 2, along with Cmake, as far as I'm aware, are essential for Rust - and cumulatively they take up almost 7 GB of space.

I assume this works for you, so I only need to identify the components (component names).

Yup, worked great, until I got tired of all the space hog for nothing and started relying on MinGW-w64, shipped with msys2, mentioned earlier. In terms of components, it seems like you need these:

Microsoft.VisualStudio.Component.Windows10SDK
Microsoft.VisualStudio.Component.VC.Tools.x86.x64
Microsoft.VisualStudio.Component.VC.CMake.Project

Found on the same page you've linked to ealier. And to answer your previous question, the Core features you've tried to install previously aren't enough, from the looks of it.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.