Zipping as .XAP files

Silverlight

Collaborate with ComponentOne technical experts and fellow developers.

Zipping as .XAP files

Answered (Verified) This question is answered

In my silverlight application I firstly unzip a .XAP file using C1Zip and put files into isolated storage.

Then I zip that files and save as .XAP file.

After that I try to run that .XAP application in browser - but it doesn't work.

If I try 7-Zip or WinZip to repack .XAP manually - it works.

I tried different CompressionLevel of C1Zip, but result is the same: it doesn't work.

How to solve this problem?

Verified Answer
All Replies
  • The compression part is clear and it definitely should work.

    But I'm confused about the rest of the application. I assumed you were running C1Zip on the server to modify the xap file before deployment. But then you talked about isolated storage, which suggests you are running it on the client. But that would not make much sense...

    Do you have a small sample you can post here so we can look into it? That would make things easier to understand...

    Thanks in advance.

  • This is completly client-side silverlight application.

    1) User runs this application in browser, then clicks button "Open" an in OpenFileDialog chooses a .XAP file to work with.

    2) This file is unzipped to isolated storage using C1Zip.

    3) After that user is to make some changes in files from that .XAP. (But now he couldn't, because we are testing just zip/unzip functionality)

    4) Then he clicks a "Save" button and chooses file name with .XAP extention in SaveFileDIalog to zip files to. Files from isolated storage are zipped with that name and saved to disk.

    Finally I have just .XAP file unzipped and zipped again without changes. But when I try to run that repacked .XAP using TestPage.html it doesn't work. Why?

     

  • I ve got a mistake in my code. C1 Zip library works normally. Sorry guys! =\

  • No problem :)

Page 1 of 1 (5 items)