How to build MSIX packages for Windows Store and sideloading from the same project.
The following article uses options that are available starting with the Professional edition and project type.
A common MSIX deployment scenario is to deliver your application on both Microsoft Store and your own website.
In order to implement this scenario you need to build two separate MSIX packages:
- The Microsoft Store version of the package must use a Microsoft supplied Publisher field and must be signed externally with a temporary certificate provided by Microsoft.
- Usually, the MSIX build used for your website should be signed with a different certificate and will have a different Subject/Publisher.
The following article will explain how to implement the above scenario using a single .AIP project and a single build operation.
The first step is to create a new MSIX Package project.
Then go to Builds page, add a new MSIX build (click on MSIX/APPX Build toolbar button) and set its Distribution to Microsoft Store. The default MSIX build created along with the project will be used for website deployment as its Distribution is set by default to Sideloading.
The next step is to go to Digital signature page and configure the settings for signing the package.
When selecting a certificate in the Digital signature page, Advanced Installer will try to extract the Subject and store it internally.
Go to Package Information page and configure the Publisher ID. This ID will be used for all Microsoft Store MSIX builds and for the Sideloading ones as well, in case the cached subject is empty.
At build time, Advanced Installer's behavior is the following:
- For Sideloading distribution type, it will try to synchronize the Publisher ID with this cached Subject. If the cached Subject is empty, the Publisher ID from the manifest (displayed in the Package Information page) will be used instead.
- For MSIX build with the Microsoft Store distribution type, the package will not be signed and the Publisher ID from the manifest (displayed in the Package Information page) will always be used.
The final step is to just build the project. The result will be an unsigned MSIX build, with the Publisher Id from the Package Information page - to be deployed in Microsoft Store and another MSIX Build, signed with your configured certificate, with the publisher ID synchronized with the certificate's subject - to be deployed on your website.