5

I am trying to download Build Tools for Visual Studio 2019 from https://visualstudio.microsoft.com/downloads/ But when I click on download button, system downloads an exe which tries to connect to internet to download rest of the package.

How can I just get offline version of Build Tools for Visual Studio 2019 or Build Tools for Visual Studio 2017.

SharpCoder
  • 15,708
  • 34
  • 126
  • 225
  • 1
    `it downloads Visual Studio 2019 community edition` - do you think that because of the generic "Thank you for downloading Visual Studio" message? The file that is downloaded is named `vs_buildtools__1021818695.1449586970.exe` which looks legit to me. – GSerg Jan 22 '20 at 22:16
  • 1
    @GSerg : its ans online installer (about 1.3 MB). I need a offline installer. Updated the question. – SharpCoder Jan 22 '20 at 22:23
  • Haven't tried it, but [this](https://docs.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio?view=vs-2019) may work with it too. – GSerg Jan 22 '20 at 22:26
  • Like @GSerg wrote, you should create an offline installer by using the cache functionality Microsoft describes in the article. I did this for VS2017 and it was a bit tedious, but it worked for me. – Max Play Jan 22 '20 at 22:54

1 Answers1

7

How can I just get offline version of Build Tools for Visual Studio 2019 or Build Tools for Visual Studio 2017.

Firstly, thanks to GSerg and Max for sharing the useful info.

Before creating an offline package for Build Tool for VS2019(it is the same theory as the Visual Studio), you also need an environment with a network to download the corresponding workload in advance according to your needs , and then pack it into an offline package so that you can install the offline package in other non-network environments.

This method can only pre-select and download the related workload to install and then package it for others to install. So when creating an offline package, it's best to download all the workload, after that, you do not worry about the lack of workload which you need.

Please follow these steps:

1) download the exe file of build tool for VS2019

2) enter CMD and cd into the exe file path

3) input these:

vs_buildtools_xxxxx.exe --add Microsoft.VisualStudio.Workload.MSBuildTools --layout c:\offlineBuildTool --lang en-us

Microsoft.VisualStudio.Workload.MSBuildTools is a "wrapper" Workload ID and more ID you can refer to this.

Besides, you can see this document about the other available switches.

c:\offlineBuildTool is just the path of the offline installer for Build Tool for VS2019.

Or to install all the workloads, you can use this command:

vs_buildtools_xxxxx.exe  --layout c:\offlineBuildTool --lang en-us

4) then you can move the OfflineBuildTool package into other environment with no network and run the buildtool.exe which is in the folder.

In addition, you can see this thread for more info.

Perry Qian-MSFT
  • 13,922
  • 1
  • 6
  • 20