This project is read-only.

Exception on d.Save

Jul 23, 2010 at 5:15 PM

Hi all,

 

Database works fine -- I can create a new one and add objects, fantastic. But when I call d.Save(), I get an exception that SharpZipLib is not found. (I downloaded the .NET version and added it as a reference to my project, but that didn't seem to help.)

 

Here's the stack trace. Any ideas how to fix this?

 

--Ashiq

 

{SilverlightDatabase.Exceptions.SaveException: Cannot save data. See InnerException for details ---> System.IO.FileNotFoundException: Could not load file or assembly 'SharpZipLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=79972c321e390bcb' or one of its dependencies. The system cannot find the file specified.
   at SilverlightDatabase.Compression.CompressionUtility.Compress(Byte[] byteData)
   at SilverlightDatabase.Compression.CompressionUtility.CompressString(String input)
   at SilverlightDatabase.Database.WriteDatabaseToStream(Stream stream)
   at SilverlightDatabase.Database.Save()

Jul 24, 2010 at 1:05 AM

You need silverlight version of the library - http://slsharpziplib.codeplex.com/.   I will take a look this weekend and see if there is anything else that needs to be done.  Thanks for reporting this.

Sergey

Jul 24, 2010 at 1:13 AM

This should be all you need to do.  Just use Silveright version of the zip library.

Jul 24, 2010 at 2:46 AM

Hi Sergey,

As I mentioned, I did download and install the library; but the exception still appears.

Jul 24, 2010 at 8:31 PM

From what I see is that you mentioned that you used .NET version, not SL version.  Another possibility is that DLL is not trusted on your machine because it came from the internet.  To address this issue, right click on your downloaded DLL, go to properties and if you see Unblock button, click on it.

 Thanks

Jul 24, 2010 at 9:19 PM

Hi,

 

I did indeed download the SL version (the .NET one won't work because it's not built against Silverlight) and I unblocked it. Same exception occurred.

 

--Ashiq

 

Jul 25, 2010 at 3:20 PM

I would try to remove and re-add the refernce then pointing to your new downlaoded DLL.  I would also run clean up on the solution just in case.  I am not sure what else to suggest short of looking at your complete solution.

Sergey.