How to create a Visual Studio 2017 offline installer?

How to create a Visual Studio 2017 offline installer?


Microsoft released the final version of Visual Studio 2017 on 7th March 2017, which brought a set of new features and enhancements for the developers to build apps for any platform in any language. It comes in web installer only. No ISO/DVD images are available.

 

In case you need an offline installer, you can easily create that and customize it as per your need. Follow the steps mentioned below to create the installer.

 

visual-studio-2017-offline-installer

 

The 'Visual Studio 2017' build that you generally get from internet is a web installer which downloads the selected workflows and components every time you start the installation. If you would like to create an offline installation layout of Visual Studio 2017 to install it on multiple computers without downloading it all the times, follow the steps mentioned below:

  • First, download the web installer of Visual Studio 2017. You can select any of the editions (Community, Professional, Enterprise) listed there.
  • Save the installer in a folder. Let’s say, we are saving the Enterprise Edition of Visual Studio 2017 installer (vs_Enterprise.exe) in the “C:\VS2017\Setup” folder.
  • Now open a console window and navigate to the folder “C:\VS2017\Setup”.
  • To create the layout of the entire Visual Studio 2017 offline installer for ‘English’ localized language, enter the following command:
    vs_Enterprise.exe  --layout  “C:\VS2017” --lang  en-US
    This will create the installer image in the “C:\VS2017” folder, as we have mentioned.

 

Customization

It’s takes around 20GB+ space to create the offline installer of Visual Studio 2017 and in most of the cases we don’t need all the modules that it downloads. So, it is a generic requirement to customize and select the one that we really need. It is possible to customize the installer components to save your internet bandwidth.

 

To create the entire offline image of Visual Studio 2017, run:

vs_enterprise  --layout  "C:\VS2017"

 

To create the offline installer for English localized language:

vs_enterprise  --layout  "C:\VS2017"  --lang en-US

 

To create the offline installer for English and Japanese language:

vs_enterprise  --layout  "C:\VS2017"  --lang en-US ja-JP

 

To create the offline installer with only ".NET desktop development" workload, run:

vs_enterprise  --layout  "C:\VS2017"  --add Microsoft.VisualStudio.Workload.ManagedDesktop

 

To create the installer with ".NET desktop development" and "Azure development" workloads:

vs_enterprise  --layout  "C:\VS2017"  --add Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.Workload.Azure

 

Points to remember:

  • In case the offline installer creation fails for any reason, re-run the same command. It will start from where it left out.
  • If you want to update the existing Visual Studio offline installer layout with a most recent version available on the server, run the same command from the existing installer folder. It will download and update the installer image with only the changes.

 

 



If you have come this far, it means that you liked what you are reading. Why not reach little more and connect with me directly on Twitter, Facebook, Google+ and LinkedIn. I would love to hear your thoughts and opinions on my articles directly. Also, don't forget to share your views and/or feedback in the comment section below.

21 comments

  1. i have not fast Internet speed so can i download its offline version in parts.....and how much GB it takes for download for full modules VS

    ReplyDelete
    Replies
    1. Hi Akash,

      - The complete modules for all languages will take around 50-60 GB.
      - The complete modules for English localized language will take around 20 GB.

      Delete
    2. Yes, you can download in parts, I mean, by workloads. Let's say, if you need to work with WPF, download only the .NET Desktop development workload.

      When you want to work with Azure, download the Azure module in the same offline installer directory. Later, you have the complete bunch of installer files for offline installation.

      Delete
  2. How do I install it after I download it? Where is the install file?

    ReplyDelete
    Replies
    1. If you have downloaded the Enterprise Edition, go to the offline installer folder (where you downloaded), check for a file named "vs_enterprise.exe". For professional edition, it will be "vs_professional.exe".

      Alternatively, you can run the "vs_installer.exe".

      Delete
  3. Hi,

    I want to download only below mentioned workloads,
    .NET desktop development
    ASP.NET and web development
    Azure development
    Data storage and processing
    Office/SharePoint development

    if i am trying download from Offline for a particular workload its downloading only json file and certificates.

    Can you please share me the steps for offline downloading for mentioned workloads.

    Thanks & Regards,
    Praveen H

    ReplyDelete
    Replies
    1. Use the following command:

      vs_enterprise --layout "C:\VS2017" -lang en-US --add Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.Workload.NetWeb Microsoft.VisualStudio.Workload.Azure Microsoft.VisualStudio.Workload.Data Microsoft.VisualStudio.Workload.Office

      Hope, this is useful and solve your query. Let me know, if any further issues.

      Regards,
      Kunal Chowdhury

      Delete
  4. Is there something wrong with my command? It launches the prepper with Win UI, the loading bar finishes and then it just closes, no download begins:

    vs_Enterprise.exe --layout "C:\vs2017" --lang en-US --add Microsoft.VisualStudio.Workload.CoreEditor Microsoft.VisualStudio.Workload.Azure Microsoft.VisualStudio.Workload.Data Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.Workload.NetCoreTools Microsoft.VisualStudio.Workload.NetCrossPlat Microsoft.VisualStudio.Workload.NetWeb Microsoft.VisualStudio.Workload.Node Microsoft.VisualStudio.Workload.Office Microsoft.VisualStudio.Workload.Universal Microsoft.VisualStudio.Workload.VisualStudioExtension

    ReplyDelete
    Replies
    1. ... and it's the same as Praveen Hiremath's. I get only a vs_installer.version.json and a certificates dir.

      Delete
    2. Hi Emm,

      There's nothing wrong with the command that you specified. When the Win UI loading bar finishes it opens a Console Window after some time. That will show you the progress of each component. Don't close that window until it closes automatically.

      Make sure that the path that you specified, exists. Let me know, how it goes.

      Delete
    3. I've said already, the download doesn't begin. The DOS box which shows each component being downloaded never shows. However I did it for each component in part for the same source folder in a batch and it works. It's possible that the one command is just too long. As a sidenote, I was hoping to make the overall installation kit smaller but it's not. 16.9GB with recommended and optional. I just might include game dev and native as well and have the whole package.

      Delete
    4. Glad to know that, you were able to download the components selectively. I would request you to submit this issue in UserVoice of Visual Studio, so that, Microsoft can check and fix (if any).

      Delete
  5. Hi sir, Can you help me? command line for visual studio stops to download and closes. But when I tried to re-type the commands for the offline installation It opens the boostrap but does not continue the download anymore. Thank you.

    ReplyDelete
    Replies
    1. My advice, make a batch (a text file with .cmd extension) and place one command line for each component like like:
      vs_Enterprise.exe --layout "C:\vs2017" --lang en-US --add Microsoft.VisualStudio.Workload.CoreEditor
      vs_Enterprise.exe --layout "C:\vs2017" --lang en-US --add Microsoft.VisualStudio.Workload.Azure
      vs_Enterprise.exe --layout "C:\vs2017" --lang en-US --add Microsoft.VisualStudio.Workload.Data
      vs_Enterprise.exe --layout "C:\vs2017" --lang en-US --add Microsoft.VisualStudio.Workload.ManagedDesktop
      etc...
      After the bootstrap is done, a dos box should appear downloading each component.
      Also make sure you run vs_Enterprise.exe from outside of C:\vs2017, the one in there is not running the downloads for some reason. So have the single vs_Enterprise.exe in C:\ and run it from there to download to C:\vs2017.
      Good luck! With MS you... we... need it.

      Delete
  6. thank you for the guide, i have downloaded all the offline setup component for visual studio 2017 community setup

    ReplyDelete
  7. What command should i use to add the .Net and crossplatform in my visualstudio2017 ????

    ReplyDelete
  8. For me it just starts showing file name with extension .json but it doen not proceed with download instead it disappear. Why?

    ReplyDelete
  9. can not do it... json just disappears and nothing happens

    ReplyDelete

 
© 2008-2017 Kunal-Chowdhury.com - Microsoft Technology Blog for developers and consumers | Designed by Kunal Chowdhury
Back to top