Skip to content

Instantly share code, notes, and snippets.

@mitchellmebane
Last active March 1, 2021 08:12
Show Gist options
  • Save mitchellmebane/7f3fc4db27cc41333437f88c450a62f7 to your computer and use it in GitHub Desktop.
Save mitchellmebane/7f3fc4db27cc41333437f88c450a62f7 to your computer and use it in GitHub Desktop.
NPM windows-build-tools manual install

Visual Studio 2015 Build Tools (1.73 GB)

Downloading

  1. Get VS2015 url from https://github.com/felixrieseberg/windows-build-tools/blob/master/src/constants.ts
  2. Save file into C:\vs_build_tools\windows-build-tools_vs2015\
    • C:\vs_build_tools\windows-build-tools_vs2015\visualcppbuildtools_full.exe
  3. Open cmd prompt and run installer in offline-installer-builder mode (as per https://msdn.microsoft.com/en-us/library/mt706497.aspx)
    • cd /d C:\vs_build_tools\windows-build-tools_vs2015\
    • visualcppbuildtools_full.exe /layout C:\vs_build_tools\windows-build-tools_vs2015\offline\

Installing from download

Go into the layout directory (C:\vs_build_tools\windows-build-tools_vs2015\offline\ in the above example) and run the installer exe with the /NoRefresh and /NoWeb switches.

cd /d C:\vs_build_tools\windows-build-tools_vs2015\offline\
.\VisualCppBuildTools_Full.exe /NoRestart /S /L "C:\vs_build_tools\windows-build-tools_vs2015\build-tools-log\vs2015-build-tools.txt" /NoRefresh /NoWeb

Documentation

VS2015 build tools install script doesn't modify the install https://github.com/felixrieseberg/windows-build-tools/blob/master/ps1/launch-installer.ps1#L39

  • ./BuildTools_Full.exe /NoRestart /S /L "$BuildToolsInstallerPath\build-tools-log.txt"
    • /NoRestart - Do not restart during or after installation.
    • /S - Quiet mode with no display and no user interaction.
    • /L <filename> - Specifies a location for the log file.

It may be possible to replace some of the install command line options with an AdminDeployment.xml file: https://msdn.microsoft.com/en-us/library/ee225237.aspx

Visual Studio 2017 Build Tools (827 MB)

Download

  1. Get VS2017 URL from https://github.com/felixrieseberg/windows-build-tools/blob/master/src/constants.ts
  2. Save file into C:\vs_build_tools\windows-build-tools_vs2017\
    • C:\vs_build_tools\windows-build-tools_vs2017\vs_BuildTools.exe
  3. Open cmd prompt and run installer in offline-installer-builder mode (as per https://docs.microsoft.com/en-us/visualstudio/install/create-a-network-installation-of-visual-studio)
    • cd /d C:\vs_build_tools\windows-build-tools_vs2017\
    • visualcppbuildtools_full.exe --layout C:\vs_build_tools\windows-build-tools_vs2017\offline\ --add Microsoft.VisualStudio.Workload.VCTools

Documentation

VS2017 build tools install script selects only the "Microsoft.VisualStudio.Workload.VCTools" package https://github.com/felixrieseberg/windows-build-tools/blob/master/ps1/launch-installer.ps1#L36

  • ./vs_BuildTools.exe --norestart --quiet --add Microsoft.VisualStudio.Workload.VCTools
    • --norestart - If present, commands with --passive or --quiet will not automatically restart the machine (if required). This is ignored if neither --passive nor --quiet are specified.
    • --quiet - If present, the command proceeds without UI. Progress messages are written to stdout and error messages are written to stderr. This option cannot be used with --passive.
    • --add - This defines an artifact (group, workload, or component) that is to be added to the installation. It can appear multiple times on the command line.

Visual Studio Build Tools currently offers both the VS2017 (14.1) and VS2015 (14.0) compilers. However, the Build Tools workload by default only installs VS2017. To use the Visual Studio Build Tools package with things that originally required the VS2015 build tools, the following additional components from the Microsoft.VisualStudio.Workload.VCTools workload should be selected:

VS 2017 installer workloads

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