Question

I need to be able to extract content from a WP8 xap file (by renaming to .zip & unzipping), change the content of one of my text files, repackage it (using send to compressed (zipped) folder then rename to xap) and the deploy it using XapDeploy.exe

All works fine except for the deploy stage. XapDeploy reports the Status as XAP file is invalid.

Is there another step I need to do?

Is this possible at all?

The reason for doing this outside of the build process is to allow customers who don't have the source code to change this single text file to suit their needs before deploying it to their workforce.

Was it helpful?

Solution

That process works just fine for me on WP8 using FIle Explorer.

Here are the two things that could have gone wrong:

  1. Are you trying to use production XAPs from the Windows Phone Apps service? Those are signed with the WmPrHeader and can no longer be changed without braking that signature. Make sure you're using XAPs generated from VS2012.

  2. Your ZIP format doesn't match the XAP ZIP format. It could be that the way you're adding a file into the ZIP and saving the new ZIP changes the compression algorithm to something unsupported by WP8. Make sure you're using the same compression alogirthm with the same parameters.

OTHER TIPS

Silverlight supports only a subset of compression methods. You can use infoZip version 2.32 to repackage. Note, info zip Version 3.0 (current) archives are not compatible. There is a hint about PKZIP compatibility in the info zip bugs section.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top