Bug 41983 - Error downloading NuGet packages
Summary: Error downloading NuGet packages
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: NuGet ()
Version: 6.1.0 (C8)
Hardware: All All
: --- normal
Target Milestone: master
Assignee: Matt Ward
URL:
Depends on:
Blocks:
 
Reported: 2016-06-20 00:52 UTC by david
Modified: 2016-06-20 08:23 UTC (History)
0 users

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description david 2016-06-20 00:52:24 UTC
I'm getting a bizarre error when trying to install NuGet packages:

"The UTC time represented when the offset is applied must be between year 0 and 10,000."

I Googled the error and found the following advice:

https://leeoades.wordpress.com/2012/10/31/datetime-minvalue-be-careful/

I'm not sure if the error is in NuGet itself or in Xamarin Studio. However it has only started since upgrading to v6.1 of Studio.

The effect is devastating because Xamarin.Forms fails to install and I can't build my Android project at all. As it happens it's a brand new project created with v6.1.
Comment 1 david 2016-06-20 05:19:57 UTC
Update: changing the time zone on my computer to a US time zone (UTC -6) enabled NuGet to download the packages successfully.
Comment 2 Matt Ward 2016-06-20 08:23:45 UTC
I believe this is a bug #37970 in Mono. It affects many if not all of the recent Xamarin NuGet packages.

In Xamarin Studio 6.1 I added a patch to NuGet to workaround this but unfortunately this fix was added after the version of Xamarin Studio 6.1 was released to the alpha channel.

The workaround, as you have found, is to use a timezone that does not use a positive offset. UTC 0 or UTC with any negative offset will work.