Skip to content

Crashes due to Date bug in NuGet #757

@haf

Description

@haf

Due to this bug in NuGet: https://nuget.codeplex.com/workitem/4412

Paket crashes like this:

Something went wrong with the download of Newtonsoft.Json.FSharp 3.2.2 - automatic retry with --force.
loaded details for 'Newtonsoft.Json.FSharp@3.2.2' from url 'https://www.myget.org/F...b/api/v2'
Downloading Newtonsoft.Json.FSharp 3.2.2 to /Users/henrik.feldt/.local/share/NuGet/Cache/Newtonsoft.Json.FSharp.3.2.2.nupkg
Paket failed with:
    Argument is out of range.
StackTrace:
    at System.DateTime.op_Subtraction (DateTime d, TimeSpan t) [0x00000] in <filename unknown>:0
  at System.DateTimeOffset.get_UtcDateTime () [0x00000] in <filename unknown>:0
  at System.DateTimeOffset..ctor (DateTime dateTime) [0x00000] in <filename unknown>:0
  at System.DateTimeOffset.op_Implicit (DateTime dateTime) [0x00000] in <filename unknown>:0
  at System.IO.Compression.ZipArchiveEntry.get_LastWriteTime () [0x00000] in <filename unknown>:0
  at System.IO.Compression.ZipFileExtensions.ExtractToFile (System.IO.Compression.ZipArchiveEntry source, System.String destinationFileName, Boolean overwrite) [0x00000] in <filename unknown>:0
  at System.IO.Compression.ZipFileExtensions.ExtractToDirectory (System.IO.Compression.ZipArchive source, System.String destinationDirectoryName) [0x00000] in <filename unknown>:0
  at System.IO.Compression.ZipFile.ExtractToDirectory (System.String sourceArchiveFileName, System.String destinationDirectoryName, System.Text.Encoding entryNameEncoding) [0x00000] in <filename unknown>:0
  at System.IO.Compression.ZipFile.ExtractToDirectory (System.String sourceArchiveFileName, System.String destinationDirectoryName) [0x00000] in <filename unknown>:0
  at Paket.NuGetV2+ExtractPackage@338.Invoke (Microsoft.FSharp.Core.Unit unitVar) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Control.AsyncBuilderImpl+callA@803[System.String,Microsoft.FSharp.Core.Unit].Invoke (Microsoft.FSharp.Control.AsyncParams`1 args) [0x00000] in <filename unknown>:0

Because this is the output on the files in the nupkg:

✗ l
total 184
-rw-r--r--@ 1 henrik.feldt  1744578187  78848 Jan 14  2007 Newtonsoft.Json.FSharp.dll
-rw-r--r--@ 1 henrik.feldt  1744578187   9375 Jan 15  2007 Newtonsoft.Json.FSharp.xml

...which is wrong, obviously. I haven't been able to solicit a response from any NuGet person. They must be busy adding more powershell commands to visual studio instead of fixing the core.

I can work around this now, by using Paket pack. Leaving this bug report here though. If nothing else, please help me vote for that bug! =)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions