This project is read-only.

I failed to zip a folder

Apr 28, 2010 at 4:13 PM
hi cheeso, i try to zip a folder which it have subfolders,using your example code but it sends me an error:
'AddFiles' is not a member of 'Ionic.Zip.ZipFile'
your example code is from the documentation:
Dim ZipFileToCreate As String = ""
Dim DirectoryToZip As String = "c:\reports"
Using zip As ZipFile = New ZipFile()
    Dim filenames As String() = System.IO.Directory.GetFiles(DirectoryToZip)
    zip.AddFiles(filenames, "files")
End Using

perhaps it is more simple than it appears.
do you have another example code which zip a folder?

Apr 28, 2010 at 4:57 PM
Edited Apr 28, 2010 at 4:59 PM

I just took the code you showed, and compiled it.  It works.

It could be that you have an older version, released before the AddFiles() method was introduced.  

What version of the library are you using?

Apr 28, 2010 at 5:14 PM

i'm not sure... but in vstudio it says: version of reference :

how can i change the version?


Apr 28, 2010 at 5:19 PM

problem solved ... thanks for your time ...