Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2017 fails to install offline with "Unable to download installation files"

So I've created an offline installed of VS 2017 Community on my laptop using this command:

vs_community.exe --layout "D:\Downloads\VS Community 2017" --lang en-US --add Microsoft.VisualStudio.Component.CoreEditor Component.WebSocket Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.Workload.NetCrossPlat Microsoft.VisualStudio.Workload.NetCoreTools Microsoft.VisualStudio.Workload.Node Microsoft.VisualStudio.Component.TypeScript.2.0

When I transfer the setup files onto my corporate PC (which is behind a firewall) and run the "vs_community.exe" setup file, all I get is this error. There's no way to bypass the corporate firewall or to make exceptions. How do I install VS 2017 offline? Am I missing something here?

enter image description here

Edit: I have installed VS 2017 on my laptop keeping the internet connection active. Then when I disconnect the internet on my laptop and try installing again, the installer launches! So perhaps there are some dependencies missing on my corporate PC that are now installed on my laptop?

Edit: The above command installs .NET, .NET core, Xamarin, Node.js, TypeScript and C++ for Mobile. The total downloaded size is 13.2 GB.

like image 615
Robin Rodricks Avatar asked Mar 16 '17 09:03

Robin Rodricks


4 Answers

It worked!! All I had to do was install the certificates into the root CA! Something I missed noticing in the VS 2017 docs:

How to install from the offline installation folder

  1. Install the certificates (They are in the "certificates" folder, which is in your Layout folder. )

  2. Simply right-click each one and choose Install PFX.

  3. Specify Local machine (not current user)
  4. You can use an empty password
  5. Run the installation file. For example, run: c:\vs2017offline\vs_enterprise.exe

--- Microsoft Docs

Edit: Remember to install the certs using the Admin account on the PC, or it won't work...

like image 194
Robin Rodricks Avatar answered Nov 03 '22 03:11

Robin Rodricks


Please try to follow this steps:

  1. Right click on exe file.
  2. Select "Properties".
  3. Click on the "Digital Signatures" tab. Now you can see "signature list".
  4. Select signature
  5. Click on "Details" button.
  6. Click on "View certificate" button
  7. Click on "Install certificate" and follows installation wizard

All certificates within "signature list" should be installed. I use Windows 10.

like image 4
user2980426 Avatar answered Nov 03 '22 03:11

user2980426


Was doing this for VS Community 2017 and it would install everything and it does the core installation without any trouble. However, if i select to install the universal or .Net development portions it will install it almost completely, but it will fail on two files. It will say that it cannot download the files from the internet. The files exist in the installation directory and I even went and downloaded the files and placed them into the appropriate directories and it still thinks that it needs to download those two files preventing me from completing the installation process. If I just continue it will install everything else except those two files. I've tried this with a few different layout downloads in different forms (ISO, directory, etc) and same issue (so it isn't a bad download or anything, and I'm sure I did that all correctly). The two files are:

https://download.visualstudio.microsoft.com/download/pr/10983757/f8c877406947fdc71ed2dd9127d2f9fa/microsoft.codeanalysis.visualstudio.interactivecomponents.resources.vsix

https://download.visualstudio.microsoft.com/download/pr/11347028/25bedee219940beceecab91dac231235/microsoft.visualstudio.testtools.testplatform.legacy.core.resources.vsix

If I plug myself online and do a repair it will go grab those two files without having to grab everything else, but it kind of defeats the purpose. Don't expect a solution, but wanted to mention it because all the other problems are related to installing the certs and I can't find anything online about it failing on just a few files.

like image 3
Daniel Avatar answered Nov 03 '22 05:11

Daniel


In my case it was related to CNG key isolation windows service, it was disabled, the solution mentioned in below link:

Visual Studio 2017 - Can't install

like image 1
Wael Dalloul Avatar answered Nov 03 '22 03:11

Wael Dalloul