Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to download package 'runtime.win10-x86.Microsoft.Net.UWPCoreRuntimeSdk.2.1.1'

I'm working with Mobile App in Visual Studio 2017, but when I first created this project and tried to build it, the following error occurred:

Failed to download package 'runtime.win10-x86.Microsoft.Net.UWPCoreRuntimeSdk.2.1.1' from 'https://api.nuget.org/v3-flatcontainer/runtime.win10-x86.microsoft.net.uwpcoreruntimesdk/2.1.1/runtime.win10-x86.microsoft.net.uwpcoreruntimesdk.2.1.1.nupkg'.
The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/runtime.win10-x86.microsoft.net.uwpcoreruntimesdk/2.1.1/runtime.win10-x86.microsoft.net.uwpcoreruntimesdk.2.1.1.nupkg' has timed out after 100000ms.        

I searched and found someone suggesting I should change my DNS server from 8.8.8.8 to 208.67.222.222 but it didn't work.

How can I solve this problem?

like image 687
Rasool Ahmed Avatar asked Jul 27 '18 09:07

Rasool Ahmed


2 Answers

I hit this issue as well for all my packages. But if I copied the nupkg link to my browser, I could download the package fine. So it was an issue with VS somewhere. I filed a bug.

To workaround it, as no other solutions I found seemed to work, I downloaded nuget.exe from the Nuget Download page and then ran the following in the command line:

nuget restore MySolution.sln

This downloaded all the packages fine. Once it was done, I could run my project in VS without problems.

like image 121
Michael Hawker - MSFT Avatar answered Sep 22 '22 10:09

Michael Hawker - MSFT


Failed to download package 'runtime.win10-x86.Microsoft.Net.UWPCoreRuntimeSdk.2.1.1'

According to the error log, this issue should be more related to the internet connection, but since change DNS server not work for you and you can open that url in google chrome without timeout, I would like provide you a workaround for this issue.

Workaround:

Download the package runtime.win10-x86.Microsoft.Net.UWPCoreRuntimeSdk.2.1.1 from the nuget.org manually.

enter image description here

Add this package to the folder: C:\Users\<UserName>\.nuget\packages

Then you can build your project without that issue.

like image 32
Leo Liu-MSFT Avatar answered Sep 24 '22 10:09

Leo Liu-MSFT