[visual-studio-2017] How to download Visual Studio 2017 Community Edition for offline installation?

I am trying to get a Visual Studio 2017 Community Edition offline distribution by executing vs_Community.exe --layout f:\vs2017c\ as offered in the documentation (vs_Community.exe downloaded here, or by direct link) but this doesn't work. All I get are 2 files: f:\vs2017c\vs_installer.version.json and f:\vs2017c\certificates\vs_installer_opc.SignCertificates.p12. I have also tried /layout instead of --layout with no luck. What am I doing wrong? By the way, are there ISO files available perhaps?

UPDATE: I have installed the certificate, restarted the computer and re-tried running the installer a number of times. Nothing has really changed. A couple of times I could notice something written in red appearing in the console for less than half a second. Finally I have ran CCleaner (with full CCEnhancer custom to-clean list) to clean up everything (again! I have already done this before the first try) and tried again and now it is downloading...

UPDATE2:

I thought I have succeede but I was wrong. What I have done was a bat file of the following contents:

vs_Community.exe --layout f:\vs2017c --lang en-US --add [a list of 133 individual component IDs]

As the result of running this command the installer has tried to download all the components (including those I did not select) in all the languages (I only need en-us).

I have noticed it is downloading what I don't need, terminated the process and deleted everything for a fresh start. Next time I have only individual workloads instead of listing all the individual components. I have even tried simplifying it to just one workload like

vs_Community.exe --lang en-US --layout f:\vs2017c\ --add Microsoft.VisualStudio.Workload.ManagedDesktop

but this just doesn't work. Instead, the following pops up for half a second as the "Give us a minute. We'll be done soon..." progress bar finishes:

enter image description here

UPDATE3:

I have found out that putting the backslash at the end of the layout path beraks the stuff. I.e. vs_Community.exe --layout f:\vs2017c works but vs_Community.exe --layout f:\vs2017c\ does not. This is not the only problem, however - listing a number of workloads tohether with ;includeRecommended;includeOptional after vs_Community.exe --layout f:\vs2017c breaks it too (although it worked as I've tried it with just one workload and one extra component AND (an important condition) purged the temporary files)...

UPDATE4:

I have managed to grab the f:\vs2017c\q.2ho\resources\app\layout\Setup.exe you can see in the window title on the screenshot (which is a little bit tricky as it appears for just some seconds and gets automatically deleted shortly after) but its help output is very different from the one above. It seems that it chain-launched some other exe in the previous case. Its own output is below, no obvious way to specify individual workloads/components:

q.2ho\resources\app\layout\Setup.exe output

Finally I have given up trying to choose individual components and workloads and tried the following with no luck either: vs_Community.exe --lang en-en --layout f:\vs2017c --all --includeRecommended --includeOptional.

At the end I have ended up using just vs_Community.exe --lang en-en --layout f:\vs2017c --all - it works and only downloads the language I need, though includes a number of components I don't need actually. The resulting directory size is 18 gigabytes.

I've finished downloading and dot it installed already as by now but the question about how to actually use the layout feature parameters reliably the way they are meant to remains.

This question is related to visual-studio-2017

The answer is


  • Saved the "vs_professional.exe" in my user Download directory, didn't work in any other disk or path.
  • Installed the certificate, without the reboot.
  • Executed the customized (2 languages and some workloads) command from administrative Command Prompt window targetting an offline root folder on a secondary disk "E:\vs2017offline".

Never thought MS could distribute this way, I understand that people downloading Visual Studio should have advanced knowledge of computers and OS but this is like a jump in time to 30 years back.


No, there should be an .exe file (vs_Community_xxxxx.exe) directly in you f:\vs2017c directory !

Just start from the this directory, not from a longer path. the packages downloaded are partly having very long path names, it fails if you start from a longer path.


Check your %temp% folder after download. In my case, download went both in temp folder and one I specified. After download was completed, files from temp folder were not deleted.
Also, make sure to have enough space on system partition (or wherever your %temp% is) in the first place. For community edition download is over 16GB for everything.


Here you can download visual studio 2017 initial installer:

https://docs.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio?view=vs-2017

Run it and after few minutes it will ask what components do you want to install and in the right bottom there will be two option
"Install while downloading"
"Download all, then install"

Select any option and click install.


The command above worked for me

C:\Users\marcelo\Downloads\vs_community.exe --lang en-en --layout C:\VisualStudio2017 --all


It seems that so far you've just followed the first step of the instructions, headed "Create an offline installation folder". Have you done the second step? "Install from the offline installation folder" - that is, install the certificates and then run vs_Community.exe from inside the folder.


Just use the following for a "minimal" C# installation:

vs_Community.exe --layout f:\vs2017c --lang en-US --add Microsoft.VisualStudio.Workload.ManagedDesktop

This works for sure. The error in your first commandline was the trailing backslash. Without it it works. You don't have to download all..

You can add for example the following workloads (or a subset) to the commandline:

Microsoft.VisualStudio.Workload.Data Microsoft.VisualStudio.Workload.NetWeb Microsoft.VisualStudio.Workload.Universal Microsoft.VisualStudio.Workload.NetCoreTools

Sometimes the downloader seems to not like too much packages. But you can download the packages (add the other workloads) step-by-step, this works. Like you want.

The interesting thing. The installer afterwards will download (only) the packages you selected which you have NOT downloaded before, so it is quite smart (in this point).

(Of course there are more packages available).


I have used the exact steps from here and it worked flawlessly : https://docs.microsoft.com/en-us/visualstudio/install/install-vs-inconsistent-quality-network

In 3 simple steps:

Step 1 : Download the respective Visual Studio 2017 version from the download page (https://www.visualstudio.com/downloads/)

Step 2: Open your command prompt as Administarator, point to where your Visual studio download exe is and execute the following command (this command is specifically for Web & Desktop development) :

vs_community.exe --layout c:\vs2017layout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Component.GitHub.VisualStudio --includeOptional --lang en-US

Step 3 : Traverse to the path c:\vs2017layout in your command prompt and then run the following command (this command is specifically for Web & Desktop development)

vs_community.exe --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Component.GitHub.VisualStudio --includeOptional

You should goto the Layout folder and issue the following command:

F:\vs2017c>vs_community.exe /finalizeInstall

Then it will auto pickup cache components bypass downloading.


All I wanted were 1) English only and 2) just enough to build a legacy desktop project written in C. No Azure, no mobile development, no .NET, and no other components that I don't know what to do with.

[Note: Options are in multiple lines for readability, but they should be in 1 line]
vs_community__xxxxxxxxxx.xxxxxxxxxx.exe
    --lang en-US
    --layout ".\Visual Studio Cummunity 2017"
    --add Microsoft.VisualStudio.Workload.NativeDesktop 
    --includeRecommended

I chose "NativeDesktop" from "workload and component ID" site (https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community).

The result was about 1.6GB downloaded files and 5GB when installed. I'm sure I could have removed a few unnecessary components to save space, but the list was rather long, so I stopped there.

"--includeRecommended" was the key ingredient for me, which included Windows SDK along with other essential things for building the legacy project.