The latest version of Visual Studio removed the availability to download an offline installer but instead, they offer to download a layout of the installer in case you have unreliable network environments or no internet at all. Basically, what this method does, is to create a copy of the installer itself having the option of selecting the specific tools you need.
You can visit this link for instructions from Microsoft. Create an offline installer(Microsoft)
Note: This installer layout will only last for 30 days as stated from the link above and this process needs internet for the downloading of files needed for offline installation.
To start, download visual studio 2017 installer. You can download the community version, This is the free version of visual studio.
You can use this link to download a fresh copy of https://visualstudio.microsoft.com/downloads.
First, Locate visual studio installer you just downloaded a while ago. In my case it is inside C:\Users\username\Downloads\ vs_community.exe.
Second, Open your command prompt(cmd) and navigate to C:\Users\username\Downloads\ which is where your installer located.
Third, run the code below in your command prompt to create a local cache for the visual studio 2017 installer. This will create a folder c:\vs2017layout containing visual studio installation files.
- vs_community.exe –layout c:\vs2017layout –add Microsoft.VisualStudio.Workload.ManagedDesktop –add Microsoft.VisualStudio.Workload.NetWeb –add Component.GitHub.VisualStudio –includeOptional –lang en-US
You can visit this link from Microsoft to get additional command to download other visual studio tools. Install Visual Studio 2017 on low bandwidth or unreliable network environments
Run the command and it will open a window and start downloading necessary files to transfer to your local directory.
See the image below.
After that, another command prompt will open showing you the progress of downloaded files.
Lastly, Let’s check if the files are created inside c:\vs2017layout. After this process, you can copy this files into your drive and you can install it without using the internet.
That’s it! Hopes this helps!