Skip to content
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

minimal Visual Studio components for Rust #3266

Closed
cataggar opened this issue Jul 28, 2021 · 3 comments
Closed

minimal Visual Studio components for Rust #3266

cataggar opened this issue Jul 28, 2021 · 3 comments

Comments

@cataggar
Copy link

I think some Visual Studio users may be interested in the minimal components needed to get Rust set up. I think those components can be installed by launching Visual Studio Installer and importing a .vsconfig file.

In rust-lang/rustup#1462 (comment), I suggested creating a visual-cpp-build-tools.vsconfig with:

{
  "version": "1.0",
  "components": [
    "Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
    "Microsoft.VisualStudio.Component.VC.Redist.14.Latest",
  ]
}

Can the Visual Studio Installer take a URL? cc @heaths


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@stevewhims
Copy link
Member

Hi, @cataggar, I'm just wondering whether this technique is definitely correct, and vetted. I ask because of the "I think those components can", and the query about whether or not VS Installer can take a url.

Since this is an internal MS query, how do you feel about creating a PR containing the (correct, and vetted) changes that you'd like to see made to this topic? :) For info/instructions, please see: https://review.docs.microsoft.com/en-us/windows-authoring-guide/quickstart?branch=main.

Many thanks!
Steve

@heaths
Copy link
Member

heaths commented Jul 29, 2021

It takes a URL for the channel manifest and you can pass --add <component>, but a .vsconfig file is supported, yes. I designed it to be rooted in a repo (in hindsight, we should've spec'd/supported it more like a .gitignore file that can work at multiple levels) and we added support for it ~15.7.

See https://docs.microsoft.com/visualstudio/install/use-command-line-parameters-to-install-visual-studio for more command line options. For example,

# defaults to the Enterprise product for whatever channel you downloaded, but any could be selected instead.
vs_enterprise.exe --installPath C:\DevStudio --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -add Microsoft.VisualStudio.Component.VC.Redist.14.Latest

One thing to note is that while workload and component IDs aren't supposed to change, it has and will likely happen again. It's not often but, IIRC, these component IDs have been stable.

@cataggar
Copy link
Author

Thanks @heaths! I've committed a visual-cpp-build-tools.vsconfig to a repo with setup instructions. Thanks for the links @stevewhims. Hopefully, the docs can be updated when/if it gets vetted.

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

No branches or pull requests

4 participants