Dnu has always been canceled or timed out when restoring a vnext mvc demo

I am extracting the sample code from https://www.github.com/aspnet/home . when I restore packages in the last / HelloMvc folder, the following error occurred:

Warning: FindPackagesById: Microsoft.AspNet.Http.Features HTTP request timed out. Retrying. GET https://nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Http.Features' Error: FindPackagesById: Microsoft.AspNet.Hosting.Server.Abstractions HTTP request timed out. Exiting. Error: FindPackagesById: Microsoft.Framework.Configuration HTTP request timed out. Exiting. Error: FindPackagesById: Microsoft.AspNet.Http HTTP request timed out. Exiting. Error: FindPackagesById: Microsoft.Framework.Configuration.EnvironmentVariables HTTP request timed out. Exiting. Error: FindPackagesById: Microsoft.Framework.Configuration.CommandLine HTTP request timed out. Exiting. Error: FindPackagesById: Microsoft.Framework.DependencyInjection HTTP request timed out. Exiting. Error: FindPackagesById: Microsoft.Framework.Configuration.Ini HTTP request timed out. Exiting. Error: FindPackagesById: Microsoft.Framework.Logging HTTP request timed out. Exiting. ---------- System.Threading.Tasks.TaskCanceledException: A task was canceled. at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter`1[System.Net.Http.HttpResponseMessage].GetResult () [0x00000] in <filename unknown>:0 at System.Net.Http.HttpClientHandler+<SendAsync>c__async0.MoveNext () [0x00000] in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- 

but I successfully restore it to 'lastest / ConsoleApp', then I use wget to load pacakge with a failed url, no problem, I can unzip the dll from this package.

I have recovery in 'lastest / HelloMvc' using mono 1.0.0-beta7-12274 runtime or recovery in '1.0.0-beta5 / HellowMvc' using runtime 1.0.0-beta5 or changing the use of docker file (microsoft / aspnet), even change the computer, the error is ~

+5
source share
2 answers

Have you tried running mozroots --import --sync ? I found this solution at https://github.com/aspnet/Docs/issues/184 and it worked for me.

+5
source

use the following command env MONO_THREADS_PER_CPU = 2000 dnu restore. It worked for me. You can also set a global environment variable, in which case you do not have to enter env MONO_THREADS_PER_CPU every time you restore dnu.

0
source

All Articles