rust-lang / rust-lang/rustup

rustup didn't install Visual Studio

Open
#3,823 8 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug docs O-windows
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

If rustup-init detects that Visual Studio is installed but with the incorrect modules, it should say so.

If you don’t have Visual Studio already installed then rustup-init will offer to automatically install the prerequisites.
- https://rust-lang.github.io/rustup/installation/windows-msvc.html

But when I ran rustup it didn't offer to install Visual Studio:

> rustup

Rust Visual C++ prerequisites

Rust requires the Microsoft C++ build tools for Visual Studio 2013 or
later, but they don't seem to be installed.

You can acquire the build tools by installing Microsoft Visual Studio.

  https://visualstudio.microsoft.com/downloads/

Check the box for "Desktop development with C++" which will ensure that the
needed components are installed. If your locale language is not English,
then additionally check the box for English under Language packs.

For more details see:

  https://rust-lang.github.io/rustup/installation/windows-msvc.html

Install the C++ build tools before proceeding.

If you will be targeting the GNU ABI or otherwise know what you are
doing then it is fine to continue installation without the build
tools, but otherwise, install the C++ build tools before proceeding.

Continue? (y/N)

And I see this with the default project:

> cargo build
   Compiling test v0.1.0 (C:\Users\AMONGUS\projects\test)
error: linker `link.exe` not found                                                                                                                                                                                              
  |
  = note: program not found

note: the msvc targets depend on the msvc linker but `link.exe` was not found                                                                                                                                                   

note: please ensure that Visual Studio 2017 or later, or Build Tools for Visual Studio were installed with the Visual C++ option.

note: VS Code is a different product, and is not sufficient.

error: could not compile `test` (bin "test") due to 1 previous error       

is it 2013 or 2017?

Why is this most basic step of "install rust on Windows" seemingly so completely broken and/or poorly documented?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the rustup-init Windows MSVC prerequisite detection and compare its behavior with the Windows MSVC installation documentation. Reproduce the case where Visual Studio is installed without the required C++ modules, then verify that the resulting guidance distinguishes the supported Visual Studio versions and explains the missing prerequisites.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.