Packaging

The tools required to create an application package for uploading to the Microsoft Store are included as part of the Windows Software Development Kit. If you have not already installed this you can download it from developer.microsoft.com/en-us/windows/downloads, either as part of Visual Studio, or as a separate package.

To upload an application to the store we must create a .appx file (an application package). This requires an additional manifest file, named AppxManifest.xml, which contains the metadata about the application being packaged. Its contents are documented on the Microsoft website at docs.microsoft.com/en-us/uwp/schemas/appxpackage/how-to-create-a-basic-package-manifest. The resulting manifest file should have at least one Application element within the Applications section.

To create the package from our source files, we use a MakeAppx.exe command, as indicated in the following code snippet. By using the /d parameter, we can specify a directory of files to package – if you want to use a subset of the files, you can create a mapping file and specify that with the /f parameter instead:

MakeAppx.exe bundle /d sourcedir /p myapp.appx

Once the .appx file has been created, it must be signed. The SignTool.exe command can be used to sign an application package. Setting up the certification to support application signing is outside the scope of this chapter, but the documentation on the Microsoft developer portal will take you through the process. Ensure that the publisher listed in the manifest file matches the certificate that you create to sign the package.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.69.163