Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VisualStudio Build Tools 2017 offline installer

I generate an an offline installer for the build tools like this: vs_BuildTools.exe --layout c:\VS_BuildTools2017_offline --add Microsoft.VisualStudio.Workload.MSBuildTools --add Microsoft.VisualStudio.Workload.VCTools --lang en-US

I move this folder to a build agent (which has no internet connection, and no, it will never have one!), and then execute the vs_BuildTools.exe in that folder even with --noWeb or --noweb, but no matter what option I give, it will always fail with no internet connection available. Surely I am missing something, so any hints on what are appreciated

like image 775
n80fr1n60 Avatar asked Oct 11 '17 09:10

n80fr1n60


People also ask

How do I install VS 2017 Build tools?

To install them just select the “VC++ 2015.3 v140 toolset for desktop (x86,x64)” at the bottom of the “Optional” section. After the product install finishes you can click the “Launch” button on the VS installer to open a Developer Command Prompt for VS2017 with the v141 MSVC toolset in the path and ready to go.


Video Answer


2 Answers

All steps to install build tools:

  1. Download build tools
  2. Download layout files for offline installation:
    • Possible workloads are specified here. Following command contains workloads for msbuild and C++ build tools.
    • Run (exe file will have some version numbers in name): vs_BuildTools.exe --layout c:\BT2017offline --add Microsoft.VisualStudio.Workload.MSBuildTools --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.WebBuildTools --add Microsoft.VisualStudio.Workload.NetCoreBuildTools --lang en-US
  3. Copy c:\BT2017offline to box on which you want to install it.
  4. Open mmc and import all certificates from c:\BT2017offline\certificates to "Trusted Root Certification Authorities" of computer (not current user)
  5. Run (exe file will have some version numbers in name): c:\BT2017offline\vs_BuildTools.exe --noweb
  6. Continue clicking next ...
like image 186
JanSkalicky Avatar answered Sep 17 '22 22:09

JanSkalicky


I also had problems with this.

One important step is to install the certificates before running the installer on the target machine:

  • Install the certificates, they are in the "certificates" folder, which is in your Layout folder. Right-click each one to install it. Remember to install the certs using the Admin account on the PC. I.e. not just for the current user.
  • Run the installation file.

Answer was originally posted here.

In addition I also noticed that when running the installer on the offline machine it has by default selected some more items than what was downloaded. I had to deselect them to only install the build tools, not the SDK and so on...

But still the install failed, I am currently seeing "An installation file did not download" so I have still not managed to complete the whole install. It's microsoft.visualstudio.vc.msbuild.arm64.vsix maybe it's included in some other component that have to be --added.

Update: Nevermind, my last problem was due to not using --noweb, with it there were no errors.

like image 41
Zitrax Avatar answered Sep 17 '22 22:09

Zitrax