You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to include Geo.dll in a nuget package the packaging fails with error 'The DateTimeOffset specified cannot be converted into a Zip file timestamp' because Geo.dll's Modified date is empty.
As a workaround our CI process performs this step to set the Modified date before packaging: gci -path "geo.dll" -rec -file *.dll | Where-Object {$_.LastWriteTime -lt (Get-Date).AddYears(-20)} | % { try { $_.LastWriteTime = '01/01/2020 00:00:00' } catch {} }
Note this was not an issue with Nuget 4.5, but is an issue with Nuget 5.4. From the link above it appears that it would be an issue with Nuget > 4.6
Proposed solution:
Update Geo.dll build process to set the file's Modified date (same as Created date?)
The text was updated successfully, but these errors were encountered:
When attempting to include Geo.dll in a nuget package the packaging fails with error 'The DateTimeOffset specified cannot be converted into a Zip file timestamp' because Geo.dll's Modified date is empty.
I believe nuget pack calls the CreateEntryFromFile method documented below, which sets the file's date in the nuget package to the file's Modified date:
https://docs.microsoft.com/en-us/dotnet/api/system.io.compression.zipfileextensions.createentryfromfile?view=netframework-4.7.2
As a workaround our CI process performs this step to set the Modified date before packaging:
gci -path "geo.dll" -rec -file *.dll | Where-Object {$_.LastWriteTime -lt (Get-Date).AddYears(-20)} | % { try { $_.LastWriteTime = '01/01/2020 00:00:00' } catch {} }
Note this was not an issue with Nuget 4.5, but is an issue with Nuget 5.4. From the link above it appears that it would be an issue with Nuget > 4.6
Proposed solution:
Update Geo.dll build process to set the file's Modified date (same as Created date?)
The text was updated successfully, but these errors were encountered: