Summary: is it possible to change the application package identifier after compilation using makeappx.exe?
I have an application for storing windows (for downloading large objects, not for the store), which I need to create several copies (options / instances), because I need to be able to install and run several versions of the application at the same time that and one user. Let's say my application is called MyMultiInstanceApp, I want to clone it into two applications called MyMultiInstanceApp-Prod and MyMultiInstanceApp-Test, because having them I can install and run the * -Prod application in version 1.0 and the * -Test application in version 1.1 at the same time.
I can achieve this by making several assemblies in Visual Studio and changing the identifier (name) of the package in the manifest before each assembly - as described in Locally deploy parallel versions of the Windows Store application .
However, I would like to do this after the build time, making copies based on the source package .appx, and I work almost completely with makeappx.exe and signtool.exe , but after installation, for example, MyMultiInstanceApp-Test, the application freezes up at startup.
My approach is as follows:
1) Create the source .appx file by creating the solution in VS or via msbuild
2) Unzip the application using:
makeappx.exe unpack /p MyMultiInstanceApp.appx /d unpacked
3) Change the package identifier in AppxManifest.xml as follows:
<Identity Name="MyMultiInstanceApp-Test" Publisher="CN=JohnDoe" Version="1.1.0.0" ProcessorArchitecture="neutral" /> <Properties> <DisplayName>MyMultiInstanceApp-Test</DisplayName> ...
4) Re-package the application using:
makeappx.exe pack /d unpacked /p MyMultiInstanceApp-Test.appx
5) Sign the package using the same certificate that is used for the original package, using:
signtool.exe sign /a /v /fd SHA256 /f MyCert.pfx MyMultiInstanceApp-Test.appx
Installing a new MultiInstanceApp-Test.appx seems successful, but when you try to start it, it just freezes, and in the event viewer under this entry you can see the following:
\ Application and service logs \ Microsoft \ Windows \ Apps \ Microsoft-Windows-TWinUI / Operating:
[INFO] Activating MyMultiInstanceApp-Test_pf28w44wh44hy! The application has been taken. Execution status: attempt to activate the application, 0, operation completed successfully.
[ERROR] Activating the MyMultiInstanceApp-Test_pf28w44wh44hy! Application to crash on Windows.Launch with error: remote procedure failed to make a call.
Am I missing something or cannot change the package identifier after compilation?