[Mono-list] NuGet struggles

Andres G. Aragoneses knocte at gmail.com
Tue Oct 16 19:54:51 UTC 2012

On 16/10/12 11:55, Weeble wrote:
> I'm having trouble with NuGet on recent development versions of Mono.
> It works fine on 2.11.1, but on 2.11.2 and 2.11.4 (I haven't tried
> .3), when it tries to download several packages at once it will get
> some of them, but then hang for about two minutes before timing out
> with a message like this:
> WARNING: Could not connect to the feed specified at
> 'https://nuget.org/api/v2/'. Please verify that the package source
> (located in the Package Manager Settings) is valid and ensure your
> network connectivity.
> Unable to find version '0.3.1' of package 'Gate'.
> Under 2.11.1 it downloads all the packages in 20 seconds or so. It
> certainly doesn't take close to the amount of time it takes for it to
> time out with recent Mono versions. I've observed this on both a
> 32-bit Linux VM with 4 CPUs (running on a Windows 7 host with a 4 core
> hyperthreaded i7), and on a Mac Mini. It doesn't seem to happen when
> fetching a small number of packages, but seems to become a certainty
> when fetching around five or more. Which package will fail seems to be
> unpredictable, probably because they are all downloaded in parallel.
> Here's a paste of a console session showing what I see:
> http://pastebin.com/NeYedE9n
> I built NuGet from source (using Visual Studio - I had problems with
> its build files in Mono) and got it to print out the exception stack
> trace that's causing it to fail. I'm not certain that it fails the
> same way every time, but it does fail every time:
>   System.Net.WebException: The request timed out
>    at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult)
>    at System.Net.HttpWebRequest.GetResponse ()
>    at System.Data.Services.Client.QueryResult.Execute ()
>    --- End of inner exception stack trace ---
>    at NuGet.DataServiceQueryWrapper`1[NuGet.IPackage].Execute[IEnumerable]
> (System.Func`1 action)
>    at NuGet.DataServiceQueryWrapper`1+<GetAll>d__7[NuGet.IPackage].MoveNext ()
>    at System.Collections.Generic.List`1[NuGet.IPackage].AddEnumerable
> (IEnumerable`1 enumerable)
>    at System.Collections.Generic.List`1[NuGet.IPackage]..ctor
> (IEnumerable`1 collection)
>    at System.Linq.Enumerable.ToList[IPackage] (IEnumerable`1 source)
>    at NuGet.PackageRepositoryExtensions.FindPackagesByIdCore
> (IPackageRepository repository, System.String packageId)
>    at NuGet.PackageRepositoryExtensions.FindPackagesById
> (IPackageRepository repository, System.String packageId)
>    at NuGet.PackageRepositoryExtensions.FindPackage (IPackageRepository
> repository, System.String packageId, NuGet.Semanti
> cVersion version, IPackageConstraintProvider constraintProvider,
> Boolean allowPrereleaseVersions, Boolean allowUnlisted)

It seems this issue only affects Windows platform so maybe this is why 
it is not given priority to be fixed (as you can use MS.NET in Windows). 
AFAIK it is being tracked here:


> My questions:
> 1. Did anything change between 2.11.1 and 2.11.2 that might affect the
> behaviour of HttpWebRequest or System.Data.Services, especially when
> multiple threads are making simultaneous independent requests?
> 2. Any suggestions for next steps to diagnose this?

There is a reduced test case attached to the bug linked above, so you 
could run a binary search of the exact commit between 2.11.1 and 2.11.2 
that caused it.

More information about the Mono-list mailing list