'ZipFile. ExtractToDirectory gives System.ArgumentOutOfRangeException in mscorlib

I have a project in .NET 4.8 and C# 7.3

I'm using System.IO.Compression.ZipFile.ExtractToDirectory to unzip a zip-file. I have referenced System.IO.Compression.FileSystem Version 4.0.0.0, File Version: 4.8.3761.0

string layout = @"c:\foo\bar\layout1.zip";
string directory = @"C:\temp"

ZipFile.ExtractToDirectory(layout, directory);

I get this exception on the above line

System.ArgumentOutOfRangeException
  HResult=0x80131502
  Message=Year, Month, and Day parameters describe an un-representable DateTime.
  Source=mscorlib
  StackTrace:
   at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day) in f:\dd\ndp\clr\src\BCL\system\datetime.cs:line 611

The file is unzipped, so is this an exception that I can ignore? If not, what's the problem and how do I fix it??



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source