Opening and edting an password protected zip in dotnetcore

1.5k views Asked by At

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

2

There are 2 answers

2
Kingpin On BEST ANSWER

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

1
Johan Foley On

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