Using Create an offline installer for Visual Studio 2017, Use command-line parameters to install Visual Studio 2017 and Visual Studio Enterprise 2017 component directory I tired to create offline installer
for Visual Studio 2017, Enterprise
, first time I used following:
vs_enterprise.exe --layout --lang en-US --add Microsoft.VisualStudio.Workload.CoreEditor Microsoft.VisualStudio.Workload.NetCoreTools Microsoft.VisualStudio.Workload.NetCrossPlat Microsoft.VisualStudio.Workload.NetWeb Microsoft.VisualStudio.Workload.WebCrossPlat Microsoft.VisualStudio.Workload.Node
and its worked and I could install VS successfully.
After that I tired to update created files and add Recommended/Optional
Components to some workload
s, so I followed mentioned article, article says by adding --includeRecommended
(also --includeOptional
) switch, installer will download Recommended
(Optional
) components too. so I added (for ex.) --includeRecommended
switch like this:
vs_enterprise.exe --layout --lang en-US --includeRecommended --includeOptional --add Microsoft.VisualStudio.Workload.CoreEditor Microsoft.VisualStudio.Workload.NetCoreTools Microsoft.VisualStudio.Workload.NetCrossPlat Microsoft.VisualStudio.Workload.NetWeb Microsoft.VisualStudio.Workload.WebCrossPlat Microsoft.VisualStudio.Workload.Node
, and doesn't work (the second cmd (that shows download progress) closed immediately), in summary, I tired following commands too, and non of them doesn't work neither:
vs_enterprise.exe --layout --lang en-US --add Microsoft.VisualStudio.Workload.NetCoreTools --includeRecommended
vs_enterprise.exe --layout --lang en-US --includeRecommended --add Microsoft.VisualStudio.Workload.NetCoreTools
Also I tired in new (empty) folder, but no success.
I googled, but I found nothing, only some example that already exists in http://learn.microsoft.com.
How should I use includeRecommended/includeOptional
switches?
Update (2021-11-10)
Following solution works perfectly for Visual Studio 2022
Update
Here is the list of all available workloads (linked to their details) and usage sample:
ID
Microsoft.VisualStudio.Workload.CoreEditor
Microsoft.VisualStudio.Workload.Azure
Microsoft.VisualStudio.Workload.Data
Microsoft.VisualStudio.Workload.DataScience
Microsoft.VisualStudio.Workload.ManagedDesktop
Microsoft.VisualStudio.Workload.ManagedGame
Microsoft.VisualStudio.Workload.NativeCrossPlat
Microsoft.VisualStudio.Workload.NativeDesktop
Microsoft.VisualStudio.Workload.NativeGame
Microsoft.VisualStudio.Workload.NativeMobile
Microsoft.VisualStudio.Workload.NetCoreTools
Microsoft.VisualStudio.Workload.NetCrossPlat
Microsoft.VisualStudio.Workload.NetWeb
Microsoft.VisualStudio.Workload.Node
Microsoft.VisualStudio.Workload.Office
Microsoft.VisualStudio.Workload.Python
Microsoft.VisualStudio.Workload.Universal
Microsoft.VisualStudio.Workload.VisualStudioExtension
Create an offline installer: Documentation for VS2019 / Documentation For VS2022
vs_enterprise.exe
)D:\whatever\vs_enterprise.exe --layout d:\whatever --add Microsoft.VisualStudio.Workload.CoreEditor --add Microsoft.VisualStudio.Workload.NetCoreTools --lang en-US
vs_enterprise.exe
to install Visual Studio from the local cacheIf you want to update prev. created local cache, run vs_enterprise.exe --layout d:\whatever
Original Answer:
The installer had a bug about this issue & as the team said, the bug fixed in v15.1
(release date: 4/6/2017).
I could download Microsoft.VisualStudio.Workload.NetWeb
workload with following command successfully. (1.79GB)
vs_enterprise.exe --layout --lang en-US --add Microsoft.VisualStudio.Workload.NetWeb --includeRecommended --includeOptional