App packager (MakeAppx.exe)
App packager (MakeAppx.exe) creates an app package from files on disk or extracts the files from an app package to disk. It is included in Microsoft Visual Studio and the Windows Software Development Kit (SDK) for Windows 8. Visit Downloads for developers to get them.
The MakeAppx.exe tool is typically found at these locations:
- On x86: C:\Program Files (x86)\Windows Kits\8.0\bin\x86\makeappx.exe
- On x64 in two locations:
- C:\Program Files (x86)\Windows Kits\8.0\bin\x86\makeappx.exe
- C:\Program Files (x86)\Windows Kits\8.0\bin\x64\makeappx.exe
- Using App packager
- Command-line Syntax
- Semantic validation performed by MakeAppx
- Related topics
Note Relative paths are supported throughout the tool.
Place the AppxManifest.xml in the root of a directory containing all of the payload files for your app. An identical directory structure is created for the app package, and will be available when the package is extracted at deployment time.
Place all files in a single directory structure, creating subdirectories as desired.
Create a valid package manifest, AppxManifest.xml, and place it in the root directory.
Run this command:
MakeAppx pack /d input_directorypath /p filepath.appx
Create a valid package manifest, AppxManifest.xml.
Create a mapping file. The first line contains the string [Files], and the lines that follow specify the source (disk) and destination (package) paths in quoted strings.
[Files] "C:\MyApp\StartPage.htm" "default.html" "C:\MyApp\readme.txt" "doc\readme.txt" "\\MyServer\path\icon.png" "icon.png" "MyCustomManifest.xml" "AppxManifest.xml"
Run this command:
MakeAppx pack /f mapping_filepath /p filepath.appx
Create the certificate. The publisher listed in the manifest must match the publisher subject information of the signing certificate. For more info about creating a signing certificate, see How to create an app package signing certificate.
Run SignTool.exe to sign the package:
SignTool sign /a /v /fd hashAlgorithm /f certFileName filepath.appx
The hashAlgorithm must match the hash algorithm used to create the blockmap when the app was packaged. With the MakeAppx packaging utility, the default Appx blockmap hash algorithm is SHA256. Run SignTool.exe specifying SHA256 as the file digest (/fd) algorithm:SignTool sign /a /v /fd SHA256 /f certFileName filepath.appx
For more info about how to sign packages, see How to sign an app package using SignTool.
Run this command:
MakeAppx unpack /p file.appx /d output_directory
The unpacked package has the same structure as the installed package.
The command line argument /p is always required, with either /d or /f. Note that /d and /f are mutually exclusive.
MakeAppx pack [options] /p <output package name>/d <content directory>
MakeAppx pack [options] /p <output package name>/f <mapping file>
MakeAppx unpack [options] /p <input package name>/d <output directory>
Here is the command-line common usage syntax for MakeAppx.
MakeAppx [pack|unpack] [/h /l /o /no /nv /v /pfn]
MakeAppx packs or unpacks the files in a package in the specified input directory or mapping file. Here is the list of parameters that apply to either MakeAppx pack or MakeAppx unpack.
This option is used for localized packages. The default validation trips on localized packages. This option disables only that specific validation, without requiring that all validation be disabled.
Overwrite the output file if it exists. If you don't specify this option or the /no option, the user is asked whether they want to overwrite the file.
You can't use this option with /no.
Prevents an overwrite of the output file if it exists. If you don't specify this option or the /o option, the user is asked whether they want to overwrite the file.
You can't use this option with /o.
Skip semantic validation. If you don't specify this option, the tool performs a full validation of the package.
Enable verbose logging output to the console.
MakeAppx pack and MakeAppx unpack are mutually exclusive commands. Here are the command-line parameters that apply specifically to one but not the other:
MakeAppx pack [h]
Creates a package.
- /h algorithm
Specifies the hash algorithm to use when creating the block map. Here are valid values for algorithm:
- SHA256 (default)
You can't use this option with the unpack command.
MakeAppx unpack [pfn]
Extracts all files in the specified package to the specified output directory. The output has the same directory structure as the package.
Specifies a directory named with the package full name. This directory is created under the provided output location. You can't use this option with the pack command.
MakeAppx performs limited semantic validation that is designed to catch the most common deployment errors and help ensure that the app package is valid.
This validation ensures that:
- All files referenced in the package manifest are included in the app package.
- An application does not have two identical keys.
- An application does not register for a forbidden protocol from this list: SMB , FILE, MS-WWA-WEB, MS-WWA.
This semantic validation is not complete, and packages built by MakeAppx are not guaranteed to be installable.
Build date: 11/16/2013