How to use DotNetZip
14,939
Just add a reference to Ionic.Zip.dll - you do need to make sure you are using the right reference for your target framework version (silverlight, WPF etc)
Then the above code should work assuming you import the Ionic namespace
Also not sure what you mean by 'what project should I add' - you already have a project right, or is this just a test project and you need to create a new project? If so any project type will do - but the best tests are either a console app or a forms/wpf app
Related videos on Youtube
Comments
-
ELSheepO almost 2 years
I've downloaded DotNetZip from codeplex and I am totally lost as to what to do next.
I want to extract a
.zip
archiveI know I use something like this
string zipToUnpack = "C1P3SML.zip"; string unpackDirectory = "Extracted Files"; using (ZipFile zip1 = ZipFile.Read(zipToUnpack)) { // here, we extract every entry, but we could extract conditionally // based on entry name, size, date, checkbox status, etc. foreach (ZipEntry e in zip1) { e.Extract(unpackDirectory, ExtractExistingFileAction.OverwriteSilently); } }
My question is, what project do I add and/or what references do I add?
Thanks
-
jrummell almost 12 years
-
-
ELSheepO almost 12 yearsI had to add a project before I could use another discutils download so was wondering if i needed to do the same for this.
-
Charleh almost 12 yearsYou can just add the reference to your current project (main project, library project etc) - it should work fine
-
ELSheepO almost 12 yearsYa I got it working, was just explaining why I asked what project to add, thanks
-
Kurtis Cochrane over 7 yearsI was too busy looking to add a reference to DotNetZip, didn't think to look for an use Ionic.Zip.dll
-
Aelgawad about 6 yearsHi @Charleh , I am unable to find the file Ionic.Zip.dll, is there a project I should compile?