Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installation of the application failed. XAP package signature is not valid or the WP manifest file is invalid.

I have a WP8 app that I need to build in 3 configurations (release, release(prepro), release(fake)). Each configuration point to a different server and has different app icons. I need to be able to have all the 3 build in the phone at the same time so my solution is that I have created 3 different WMAppManifest.xml files (with different guids and icon paths) and I copy the right one in a pre-build step. This works fine (Based on this article http://www.tonicodes.net/blog/using-different-wmappmanifest-files-for-release-and-debug-builds/).

I upgraded the app to WP81 Silverlight. There is an additional Package.appxmanifest file. So I created 3 different Package.appxmanifest files, setting the PhoneProductId attribute to the right guid and added a pre-build step to do the copying also for this file.

When I try to run the app in release(prepro) or release(fake), meaning different WMAppManifest.xml an Package.appxmanifest are copied to the project first, I get

Installation of the application failed. XAP package signature is not valid or the WP manifest file is invalid. Re-sign with valid signature and fix the manifest file. 

Is there something other than PhoneProductId that I need to changed in the new Package.appxmanifest files to make work?

like image 213
Igor Kulman Avatar asked May 21 '14 13:05

Igor Kulman


3 Answers

I had the same issue, and maybe i can help you out. this xap signature is not valid happens a lot when some of the "pictures" in the appxmanifest file are not actually in the project. i have deleted my splashscreen picture that caused this error, deleting it from the appxmanifest file solved it. Beside that for each package you have a new package id wich if you want to publish the app you get in the dev center after you register your alias.

And there is the publisher ID wich you will also get after reverving an app name, its in this format "CN=************".

And the most important, and that i think what you search for, you can not install the same app twice on one phone. i tried it and somehow it just dont work. I have an app from store, and i can not install the same from visual studio before i dont delete the one from store. That happened never before on 8.0

like image 164
dinchy87 Avatar answered Oct 08 '22 18:10

dinchy87


I found a really easy workaround. Just add "DEBUG" to the end of the current Package name in the Package.appxmanifest designer.

Then you can have the debug version deployed: just be sure to remove the "DEBUG" from the Package name before you submit to the Store.

Also, if you still have the WMAppManifest.xml file, likewise append "DEBUG" to the Display Name so that on your phone you can easily differentiate which is which.

Cheers.

like image 28
kjo4jc Avatar answered Oct 08 '22 18:10

kjo4jc


I found I needed to:

  1. Make the Package.appxmanifest Package > Identity > Name unique (as per @kjo4jc's answer)
  2. Change the Package.appxmanifest mp:PhoneIdentity > PhoneProductId GUID to differ from the value used in the store.
  3. The changed GUID also needed to be changed in wmappmanifest.xml Deployment > App > ProductID to match.
like image 28
Daniel Ballinger Avatar answered Oct 08 '22 17:10

Daniel Ballinger