3

is there a way to work with password protected zip files in dotnetcore. Unfortunately System.IO.Compression does not support password protection.

So i tried to use dotnetzip, but every time i try to open an zip file i get an System.ArgumentException.

enter image description here

Kingpin
  • 1,067
  • 2
  • 14
  • 34

2 Answers2

3

I migrated to sharpcompress and now everthing works fine. Seems that ionic zip does not work under core.

Kingpin
  • 1,067
  • 2
  • 14
  • 34
  • Have just created a proof of concept .Net Core 2.2 Console App, using DotNetZip version 1.13.3 (https://www.nuget.org/packages/DotNetZip/) and can confirm that it works, having successfully created a password protected zip file. – Brett Rigby Jul 19 '19 at 07:56
  • 1
    This is correct. Me and some other people worked on migrating dotnetzip to netstandard and since release 1.13 it works correct on netcore. – Kingpin Jul 22 '19 at 07:15
0

Just to add to Kingpins answer, I tried ICSharpCode's SharpLibZip, which has an open issue rendering it unusable (for password protected files): https://github.com/icsharpcode/SharpZipLib/issues/212

So I used the tool from the accepted answer: sharpcompress https://github.com/adamhathcock/sharpcompress

Johan Foley
  • 338
  • 4
  • 9