4

I'm facing a problem right now and I don't really know how to get more informations about it.

I've converted a desktop application through Microsoft's Desktop App Converter, made some manual modifications about the visual assets, and rebundled it through "makeappx.exe". Then I signed it.

Everything went fine. Except that when I double click the appx to check it, I have the following window:

Appx Error

Which roughly translates as "Couldn't open the appx or appxbundle file" and "Reason: Failure caused by an unknown reason".

This does not helps me a lot :/

However, if I try to install the package through a simple "Add-appxpackage MyPackage.appx", it works perfectly fine.

Could anyone help me find some leads on what's happening here? I've already checked the event viewer as explained here but I couldn't find anything unusual.

Thanks,

Skefrep

Skefrep
  • 53
  • 8
  • I have the same problem, I think is something broken when we installed one of Windows updates. Some colleagues in my office managed to fix it by installing the Desktop App Converter from the store, but it didn't work for me. – Bogdan Mitrache May 05 '17 at 09:02
  • @BogdanMitrache I've updated it from the store too. I'll try to recreate my appx from another computer, maybe this would work. – Skefrep May 05 '17 at 10:18
  • I doubt, I've created tens of AppX packages, and also got others built by others and still doesn't work. The problem is within the OS, not the package (otherwise it wouldn't work with PS command), maybe something with event (double-click) handlers registered in the system, I don't know for sure. :( – Bogdan Mitrache May 05 '17 at 12:45
  • Yes, it didn't work... I hope this will be fixed soon... Thanks for your help anyway. – Skefrep May 05 '17 at 12:59
  • I have the same problem, and happened after modifying it to comply with Windows Store parameters. I regenerated also the certificate to change the CN to match the Store parameters. Add-AppxPackage works but no the graphical tool – Carlos Rafael Ramirez May 18 '17 at 17:58
  • For the author: please these tags: project-centennial and desktop-bridge microsoft staff monitor these tags. Your edit queue is full so I cannot add them myself. – Carlos Rafael Ramirez May 18 '17 at 18:02
  • 1
    @CarlosRafaelRamirez Thanks for the tags. I've directly sent an e-mail to one of the contacts I have in the Microsoft team who worked on centennial but didn't get an answer so far. – Skefrep May 29 '17 at 07:56

2 Answers2

1

It seems the Microsoft team has taken notice of this problem and investigated this appropriately.

-Here is their solution-

Bogdan Mitrache
  • 10,536
  • 19
  • 34
  • Perfect ! There was an error in my makepri command, if I follow their recommandations it works. Thanks for your help! – Skefrep Jun 02 '17 at 12:12
  • Is better if you add more info to the answer (for example the commands used) instead of only a link. – PhoneixS Jun 19 '17 at 15:31
1

The problem can be because when you convert an app with DesktopBridge the resources are signed with the manifest info and store that info in the .pri files you found in PackageFiles folder. Later, when you change something like the Publisher or the Name this signature doesn't match. To fix this you only need to recreate the .pri files.

  1. rm *.pri. Remove the old .pri files.
  2. cd C:\foo\PackageFiles\. Change current directory to the PackageFiles folder. This step is important for the next step.
  3. makepri createconfig /cf priconfig.xml /dq en-US. Create a configuration file for the resources.
  4. makepri new /pr "C:\foo\PackageFiles" /cf "C:\foo\PackageFiles\priconfig.xml". Generate the new *.pri files.
  5. Then you can make the package as usual: MakeAppx, etc.

You can find more information about this problem in "Failed due to unknown reasons" error when you try to sideload a Desktop Bridge app - App Consult Team.

PhoneixS
  • 10,574
  • 6
  • 57
  • 73
  • Hi @PhoneixS With the latest update in visual studio, I can create a package appxbundle with just few clicks and I don't have package files separately, but I am also facing this issue, tried searching a lot but no answers so far! – JD-V Oct 03 '18 at 12:25
  • Sorry, I don't know what can be as I don't have the latest version. – PhoneixS Oct 03 '18 at 16:03