Create Offline Installation of Visual C++ Build Tools 2019 for Rust

I am trying to install Rust on an offline machine and it needs me to install Visual C++ Build Tools 2019:

enter image description here

I am now trying to install Visual C++ build tools offline but I am having trouble. On an online machine, I can download the files with:

vs_buildtools__aa90d186.7874.4cfb.a00e.95c80b36e650.exe --add Microsoft.VisualStudio.Workload.MSBuildTools --add Microsoft.VisualStudio.Component.Windows10SDK.19041 --add Microsoft.VisualStudio.Workload.VCTools --layout "Z:\Visual Studio Build Tools\offline_build_tool" --lang en-us

And then install it by moving the files to the offline computer and running the vs_buildtools exe file it creates. However, even after restarting the offline machine once I have installed it offline, Rust still gives me the exact same error. So clearly I am missing some components, but I don't know what.

Can you please help me figure out which components my download command is missing? I feel like I have tried everything and it still doesn't work. I don't understand what's missing.

I've done something like this before. Below is what I have written in my notes, in case it helps at all (I'm not sure if it still works or if my notes are missing anything). You may be able to spot a difference that could help.


I'm using powershell. First acquire the build tools:

Invoke-WebRequest https://aka.ms/vs/16/release/vs_buildtools.exe -OutFile vs_buildtools.exe
.\vs_buildtools --layout vs_installer --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.Component.VC.Runtime.UCRTSDK --add Microsoft.VisualStudio.Component.Windows10SDK.19041
rm vs_buildtools.exe

Then transfer vs_installer to the offline machine and run:

cd vs_installer
.\vs_buildtools --noWeb --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.Component.VC.Runtime.UCRTSDK --add Microsoft.VisualStudio.Component.Windows10SDK.19041
2 Likes

This worked great, thank you!

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.