The type initializer for 'Ionic.Zip.ZipFile' threw an exception.

Nov 14, 2011 at 7:50 PM

Hi:

I just downloaded the "Zip" bits for Silverlight (v1.9).

In my Silverlight applicatin I am referencing, "Iconic.Zip.dll". In the code I am doing this

ZipFile zip = new ZipFile();

At this line I get a run-tim exception: "The type initializer for 'Ionic.Zip.ZipFile' threw an exception.".

What am I doing wrong?

 

thanks

 

--tolga

Jun 7, 2012 at 12:37 PM
Edited Jun 7, 2012 at 12:45 PM

Good day.

I am getting the same problem in my project.

Is there anyone that knows how to get rid of this error.

Thanks in advance

 

using (ZipFile zipFile = new ZipFile())
            {
                foreach (string item in ZipPackage_List)
                {
                    zipFile.AddFile(item);
                }
                
                zipFile.Save("Raster_" + DateTime.Now + ".zip");
            }