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

4

9

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?

Chader answered 21/5, 2014 at 13:1 Comment(1)
Encountered the same error after adding File Associations. The cause was missing image files which you have to specify as your logo. So basically make sure the resources you are specifying in XML are existing.Radarscope
D
5

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.
Dodecasyllable answered 14/1, 2015 at 8:29 Comment(1)
Thanks for sharing this - it is totally annyoing that I cannot have my app and the next version on the same device without this hack and I could not find any official documentation about this issue.Jodhpurs
O
8

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

Oversubscribe answered 21/5, 2014 at 21:33 Comment(4)
Yeah this started to happen to me after I updated my app to WP8.1. Had to uninstall my Store-version to get the debug-version deployed.Milewski
Thanks. This helped me figure out that I had some images referenced that did not exist. It sure would have been nice if there was a more descriptive error message. Instead I received the following message that basically just tells me I have an error somewhere in the manifest. >>> "Error 1 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. 0 0"Chibouk
Thank you. I had this problem. I simply uninstalled the version I had installed from windows store. Solution +1Snaggletooth
" you can not install the same app twice on one phone". This was the solution for me, thank you!Champignon
V
6

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.

Vitellin answered 1/10, 2014 at 3:28 Comment(1)
This one, amazing.Dropper
D
5

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.
Dodecasyllable answered 14/1, 2015 at 8:29 Comment(1)
Thanks for sharing this - it is totally annyoing that I cannot have my app and the next version on the same device without this hack and I could not find any official documentation about this issue.Jodhpurs
L
3

I've found this happens if you try to debug an app on a phone that already has a version of the app downloaded from the store.

The easiest way to fix is to unistall the app from your phone first.

Loess answered 23/10, 2015 at 11:8 Comment(3)
The idea was to have the app build with all those different configurations at the same at on the device.Chader
Hopefully other people with the same error, but not the exact requirements as you will still find this answer helpful.Loess
This is always the case for me when I get the error.Tepic

© 2022 - 2024 — McMap. All rights reserved.