Add Entries to MSIX AppManifest file

Copper Contributor

Hi,

We have used an automated process (via Jenkins) to create MSIX files using the MSIX packaging tool. We need to add below entries to AppManifest file. Could you Please give us some details on how to add the below entries to AppManifest file?

Thanks,

Sunali

<Application ... >
      ...
      <Extensions>
         <uap3:Extension Category="windows.appUriHandler">
          <uap3:AppUriHandler>
            <uap3:Host Name=“testapp.test.app" />
          </uap3:AppUriHandler>
        </uap3:Extension>
      </Extensions>
 </Application>

 

4 Replies
Hi,
It sounds to me like you are developing this application, i.e. you have access to it source code.

The MSIX Packaging Tool is intended to be used by IT pros to create MSIX packages for apps where they don't have the source code. It is not designed for developers.

If you have access to your source code, which it sounds like you do, then you can use Visual Studio or third-party tools like Advanced Installer to create the MSIX package.

In Visual Studio and other third-party tools, you can easily manage the contents of your manifest, depending on your needs. Some tools have dedicated GUI for these options, so you don't need to manually write the manifest.

This older Stack Overflow question has more details:
https://stackoverflow.com/questions/64702212/how-to-build-an-msix-from-comandline/64715653#64715653

@SunaliFernando 

You stated that you were using the Microsoft MSIX Packaging Tool. You can reopen the package using that tool.

  1. On the editor page scroll down and find a button to export the AppXManifest file; export the file somewhere convenient like the desktop.
  2. Using an editing tool (preferably an XML tool like Notepad++ but if you are careful Notepad will do), edit the file.
  3. In the primary <Application> element, look to see if there is an <Extensions> element.  If not add <Extensions></Extensions> just before the </Application> end marker.  Keep in mind that this must be inside an application element, there are also possibly package level extensions element outside of the application and what you want doesn't go there.
  4. Add the <Extension>  ...  </Extension> stuff that you need from your original question inside the <Extensions> area.  
  5. Look at the top of the file for the Package element.  You will see a lot of attributes defining schemas.  Look to see if there is a entry there like this:

 xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"

 

If not, add it there.  Also add a uap3 to the IgnorableNamespaces attribute.  Order on these don't matter.

 

6. Save off the file, it is OK to either overwrite the original or rename it.

7. Click the import button in the MMPT and select the updated file.  If you made a syntax mistake it will refuse and give you an error.  You can just export what is in the package (which will be the original manifest details) and try again. 

8. When successful, save off your package.

 

Regards,

 

Tim

Hi,
Thanks for the replies. We have access to the source code but we have developed the Application in Qt source. We compile the Qt source code using Qt tools. Then we use the MSIX packaging tool to create MSIX files. I have added entries to AppManifest file manually using the MSIX packaging tool. But we have a automated Jenkins job to create MSIX files. We want the automated process to add the entries to AppManifest file. We are not sure how we can add the entries in the automated process.
Thanks,
Sunali

@SunaliFernando You may be best off by looking to use the Windows Application Project in Visual Studio.  In your WAP, you have a GUI access to add to the AppxManifest, and that includes adding the URI entries that you mentioned.  Visual Studio expects you to create a solution with a .Net 6/7 project, but you should be able to get there by adding the WAP to your existing solution.