Skip to content

Conversation

@pino1536
Copy link

@pino1536 pino1536 commented Jan 11, 2026

rustup auto install script:

  • Update Visual Studio Installer download via winget
    winget is very stable and the download is official maintained by microsoft and used official
  • Remove the extra check if Visual Studio Installer is installed
    This is simple not necessary or brings any negative aspect. The download is only 4mb and it will try update the the VS Installer but don't change any installations. Its a indented and the reason why the VS Installer-Installer itself can take setup arguments.

documentation

  • shrink down the documentation
    maybe it shouldn't even have an extra site for a step you can do in a single command-line.
  • update manual download link and info's in the rustup tool
    Was very confusing, reads like you're installing the entire IDE.
  • winget command line to install (but gui install because of license agreement)

To the license thing of the build tools:
First of all they are indented to be used outside of an whole VS IDE. Official VSCode advertising it for the C#/C++ programming. Just like "Visual Studio Community", where you don't need an account or anything, the "Build Tools for Visual Studio" is also a Visual Studio Product itself where you "get an free license" by agree to it. The winget download runs the installer in gui mode and the user has to accept the license itself.

- remove the extra check if Visual Studio Installer is installed (the download is only 4mb and it will try update the the VS Installer.)
- update manual download link and infos
- winget command line to install (but gui install because of license agreement)
@rami3l
Copy link
Member

rami3l commented Jan 11, 2026

@pino1536 Oh, I didn't notice the license change until today. Thanks for pointing it out!

@ChrisDenton this should be a good opportunity for us in this regard I guess? We don't really want the user to accept the VS Community license just to fetch Microsoft.VisualStudio.BuildTools which would be way too annoying.

This may be as an alternative to #4543 even, given that we no longer have to hardcode anything with this approach. I just realized that the version string is moved elsewhere in this approach, my apologies.

Once you've downloaded and started the installer, the easiest way to get everything installed is to select "Desktop Development with C++".
This will include the necessary components.
On the "Language Packs" tab, make sure the English language pack is installed in addition to your preferred language.
But you could [download the Microsoft Build Tools for Visual Studio][vs download] Installer yourself and do the same steps manual.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
But you could [download the Microsoft Build Tools for Visual Studio][vs download] Installer yourself and do the same steps manual.
But you could [download the Microsoft Build Tools for Visual Studio][vs download] Installer yourself and do the same steps manually.

However this requires you already have a license to the Community, Professional or Enterprise edition.
If you chose the automatic install this winget command will run in the background:
```Batchfile
winget install --id Microsoft.VisualStudio.BuildTools --force --interactive --custom "--focusedUi --addProductLang En-us --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.26100"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question regarding #4543: will the wrong --add params causing the whole command to fail?

The thing is that Microsoft, as it turned out, can remove any of those components from its server, meaning that these versions might no longer be valid a while later. However, if this is not a fatal error (meaning the GUI launches correctly and the user can tick the missing boxes manually) then this would be less of a problem.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will appear to succeed but the component will be missing from the UI. There's nothing to indicate to the user that there is a missing component.

Image

Copy link
Author

@pino1536 pino1536 Jan 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but this was also a problem before (the vs installer is the same) and it only affects Windows 11 sdk. the "Microsoft.VisualStudio.Component.VC.Tools.x86.x64" is always the lasted version.
The best way would be to simple update the "Windows 11 SDK" it in the tool periodical.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is a problem currently which is why we're looking into mitigations.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is a problem currently which is why we're looking into mitigations.

There are another 2 options:

  1. We could get the SDK via winget (its not a part of the Visual Studio licens):
winget install --id Microsoft.WindowsSDK.10.0.26100
  1. We could export a json file with all available components to parse the last version:
Microsoft Visual Studio\Installer\setup.exe export --productId Microsoft.VisualStudio.Product.BuildTools --channelId VisualStudio.18.Release --config "%UserProfile%\Desktop\temp.vsconfig" --all --quiet```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we use winget then doing a search for the latest would be best (we can use the version field to filter it).

Using the json from the VS installer would be better in a sense because then we can be sure the it will show up labelled as installed when someone is attempting to debug issues. But I do worry that the json may not be stable between Visual Studio versions. That could be mitigated by ensuring we use a defined version.


// Run the installer. Arguments are documented at:
// https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio
let mut cmd = Command::new("winget");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is winget a component that comes with all supported Windows installations? Please note that we are currently stating support for Windows 10/2026 or later.

If this is not the case, maybe we should notify the user and provide an installation hint?

Copy link
Author

@pino1536 pino1536 Jan 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it comes with every Windows 10 and 11 pre installed. In many cases Microsoft uses it itself for many things. (you can see it because many auto installed stuff comes with the install source winget) and you can find everything official through winget.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not with every SKU. E.g. Windows Sandbox does not have it installed by default. I'm not entirely against using winget here but I also don't think it get us anything useful. The aka.ms links always work.

@rami3l rami3l requested review from ChrisDenton and djc and removed request for djc January 11, 2026 09:16
@ChrisDenton
Copy link
Member

@pino1536 Oh, I didn't notice the license change until today. Thanks for pointing it out!

@ChrisDenton this should be a good opportunity for us in this regard I guess? We don't really want the user to accept the VS Community license just to fetch Microsoft.VisualStudio.BuildTools which would be way too annoying.

The license change does not affect us because we use link.exe to directly develop software. Basically you can substitute "Rust" for "C++" in that blog post. This was investigated at the time and we got an official response from Microsoft in 2023.

If you want more details on the installation process or want to further customize the install then follow the walkthrough below.
Otherwise complete the Visual Studio install and continue with installing Rust.

## Walkthrough: Installing Visual Studio 2022
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think we should remove the GUI instructions, especially as it's the main user interface for the Visual Studio installer. If it's confusing we should improve that. If other installation methods are better then we should add those.

Copy link
Author

@pino1536 pino1536 Jan 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But to be honest if someone cant use the installer and find the, in text form described, components he is on the level of my grandma using a computer 😬

I even would remove the license part... somehow there isn't even a way around other then to accept them.

And somehow I wanted to clarify that it would be better to use the new auto installer because unlike other examples it does the exact same (but guided) as you would do manual.

For me as a complete newcomer to rust (one week), the documentation only to get rustup ready, splatted over 3 documentations was a bit too much for these little requirements.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to read it all. We can add a command line section before the full GUI instructions. The reason it was added in the first place is because people do indeed struggle with it.

@pino1536
Copy link
Author

As I mentioned above, I tested nearly every case:

  • No Visual Studio Installer installed
    (= Installs the Visual Studio Installer and then Visual Studio Build Tools)
  • A installed Visual Studio Installer without any Visual Studio Installation
    (= Installs the Visual Studio Build Tools)
  • A installed Visual Studio Installer with Build Tools but none component
    (= it will install the 2 components.)
  • A installed Visual Studio Installer with Build Tools but only one component
    (= it will install the missing component.)
  • A installed Visual Studio Installer with Visual Studio Community installed
    (= Installs the Visual Studio Build Tools beside the Visual Studio Community.)

For the last Test: In most cases the Visual Studio Build Tools are installed instead of the full IDE if you use other dev environments like Flutter etc. Somehow it even better in any case to install the Components as a part of the "Visual Studio Build Tools" instead to add it to "Visual Studio Community".

Copy link
Member

@ChrisDenton ChrisDenton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've stated this a few times but I do want to be absolutely clear because I consider this a blocker:

For licensing reasons we cannot recommend the build tools nor install them by default unless the user already has Visual Studio installed. We could suggest it as an alternative, so long as we're clear on the licensing requirements. Or we could perhaps allow users to select their Visual Studio edition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants