Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Offline Build tools for visual studio 2019

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.

like image 313
SharpCoder Avatar asked Feb 03 '23 16:02

SharpCoder


1 Answers

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.

like image 85
Mr Qian Avatar answered Feb 06 '23 09:02

Mr Qian