locked
Create Windows Phone 8.1 appx file using MakeAppx.exe? RRS feed

  • Question


  • Hi,

    I need to be able to build Universal App projects and generate appx packages automatically.

    To do this, I found on the documentation that I could use MakeAppx.exe. It's said that this tool can be used for Windows Store app but nothing is said about Windows Phone Store app. As Universal App output *.appx files for both Windows and Windows Phone packages, I thought I could use MakeAppx.exe to generate Windows Phone appx package. But... I start wondering if it's compatible...

    I can generate appx file using Windows Phone built files, but the appx file can't be deployed on a phone. I got the following error:

    "Error - Access to the path 'E:\$RECYCLE.BIN\S-1-5-21-6222[...etc...]' is denied."

    Here is how I'm using MakeAppx.exe:

    MakeAppx.exe pack /l /h SHA256 /f "E:\FileMapping.txt" /v /o /p "E:\TestPck.appx"
    

    I couldn't find any mapping file generated after VS build process so I generated one my self.

    Here is an extract of the structure of "FileMapping.txt":

    [ResourceMetadata]
    "ResourceDimensions"	"language-en-us"
    "ResourceId"	"English"
    [Files]
    "E:\Project\Client\Client.WindowsPhone\AppPackages\Client.WindowsPhone_1.2.1.1_ARM_Test\Client.WindowsPhone_1.2.1.1_ARM\[Content_Types].xml" 	 "[Content_Types].xml"
    "E:\Project\Client\Client.WindowsPhone\AppPackages\Client.WindowsPhone_1.2.1.1_ARM_Test\Client.WindowsPhone_1.2.1.1_ARM\App.xbf" 	 "App.xbf"
    "E:\Project\Client\Client.WindowsPhone\AppPackages\Client.WindowsPhone_1.2.1.1_ARM_Test\Client.WindowsPhone_1.2.1.1_ARM\AppxBlockMap.xml" 	 "AppxBlockMap.xml"
    "E:\Project\Client\Client.WindowsPhone\AppPackages\Client.WindowsPhone_1.2.1.1_ARM_Test\Client.WindowsPhone_1.2.1.1_ARM\AppxManifest.xml" 	 "AppxManifest.xml"
    [...etc...]

    Here is an extract of the output of MakeAppx call:

    Microsoft (R) MakeAppx Tool version 6.3.9600.17298
    Copyright (C) 2013 Microsoft.  All rights reserved.
    Option /v specified, switching to verbose output.
    Option /o specified, existing files will be overwritten.
    Option /l specified, the existence of resource file variations will not be verified.
    Option /h specified, using custom hash method: SHA256.
    The path (/p) parameter is: "E:\TestPck.appx"
    The mapping file (/f) parameter is: "E:\FileMapping.txt"
    Reading mapping file "E:\FileMapping.txt"
    MakeAppx : warning: Skipping unknown section "[ResourceMetadata]" starting from line 1.
    [Files] section found on line 4.
    MakeAppx : warning: Ignoring footprint file "[Content_Types].xml".
    MakeAppx : warning: Ignoring footprint file "AppxBlockMap.xml".
    Packing 78 file(s) listed in "E:\FileMapping.txt" (mapping file) to "E:\TestPck.appx" (output file name).
    Overwriting existing file "E:\TestPck.appx".
    Using "E:\Project\Client\Client.WindowsPhone\AppPackages\Client.WindowsPhone_1.2.1.1_ARM_Test\Client.WindowsPhone_1.2.1.1_ARM\AppxManifest.xml" as the manifest for the package.
    Adding "E:\Project\Client\Client.WindowsPhone\AppPackages\Client.WindowsPhone_1.2.1.1_ARM_Test\Client.WindowsPhone_1.2.1.1_ARM\App.xbf" to the package as a payload file.  Its path in the package is "App.xbf".
    Settings for extension xbf: Type = application/octet-stream, Compression = Normal.
    Adding "E:\Project\Client\Client.WindowsPhone\AppPackages\Client.WindowsPhone_1.2.1.1_ARM_Test\Client.WindowsPhone_1.2.1.1_ARM\Assets\BadgeLogo.scale-240.png" to the package as a payload file.  Its path in the package is "Assets\BadgeLogo.scale-240.png".
    Settings for extension png: Type = image/png, Compression = None.
    
    [...etc...]
    
    Package creation succeeded.

    Right after calling MakeAppx.exe, I try to deploy the appx file... with no success...

    Is MakeAppx compatible with Windows Phone packages or am I doing something wrong?

    Thanks for your time.

    Thursday, December 18, 2014 9:10 AM

Answers

  • I had time to dig into the problem last week and I found out why I couldn't deploy the package.

    Actually, the package I created was good but it has C++ dependencies and my appx file was at HDD root  eg: "E:\myPackage.appx".

    By creating a package that doesn't have dependencies, I had not issue deploying it then I realized that package requiring dependencies shouldn't be at HDD root.

    I just put it in a folder eg: "E:\sampleFolder\myPackage.appx" and I could deploy it successfully!

    Unfortunately, when I tried to upload the package to my Windows Phone Dev accout, it failed with the following error:

    "error 3117: We were unable to unpack the APPX package"

    The Appx file can be deployed using the deployement tool that's why I though it came from my appx not being signed, so, I used the command line signing tool but the error remains.

    No more details from the dev center web page :(

    Does anyone know if there is something special to do to generate an appx file ready to be uploaded?

    • Marked as answer by ChickenMythic Monday, March 16, 2015 11:02 AM
    Tuesday, March 10, 2015 8:04 AM
  • I Finally found what was causing this "Error 3117".

    First, I didn't need the [ResourceMetadata] in my mapping file.

    Second, one of my PCL used in the project was using a resx file as a PRI Resource but I did put this file in my mapping file. This file was not used in code, so I removed it from the PCL and the generated appx file (using with multiple lang resources) is now accepted by the Store!

    • Marked as answer by ChickenMythic Monday, March 16, 2015 11:02 AM
    Monday, March 16, 2015 11:02 AM

All replies

  • When I use visual studio to create package for store app and windows phone app, I can see the different results in the output folder.  But I cannot find any related references about this topic.

    Friday, December 19, 2014 3:48 AM
  • I wonder if anyone has been able to make an appx package for Windows Phone 8.1 WinRT using MakeAppx.exe...

    I'd like to here it's possible but for now, no matte how I'm using this tool, the output package is not deployable on any phone :(

    Monday, December 22, 2014 4:19 PM
  • Hi ChickenMythic,

    Have you tried this sample? http://msdn.microsoft.com/en-us/library/windows/desktop/hh446767(v=vs.85).aspx#create_package_using_mapfile.

    I am not familiar with this tool, you can use visual studio to create the package, and compare with the package created by makeappx tool to see if there is differences.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Wednesday, December 24, 2014 7:37 AM
    Moderator
  • I had time to dig into the problem last week and I found out why I couldn't deploy the package.

    Actually, the package I created was good but it has C++ dependencies and my appx file was at HDD root  eg: "E:\myPackage.appx".

    By creating a package that doesn't have dependencies, I had not issue deploying it then I realized that package requiring dependencies shouldn't be at HDD root.

    I just put it in a folder eg: "E:\sampleFolder\myPackage.appx" and I could deploy it successfully!

    Unfortunately, when I tried to upload the package to my Windows Phone Dev accout, it failed with the following error:

    "error 3117: We were unable to unpack the APPX package"

    The Appx file can be deployed using the deployement tool that's why I though it came from my appx not being signed, so, I used the command line signing tool but the error remains.

    No more details from the dev center web page :(

    Does anyone know if there is something special to do to generate an appx file ready to be uploaded?

    • Marked as answer by ChickenMythic Monday, March 16, 2015 11:02 AM
    Tuesday, March 10, 2015 8:04 AM
  • I found what is causing this "error 3117".

    I comes from my Mapping File.

    My application supports 2 languages so, I have 2 *.resw files included in my project as PRI Resources.

    If I only set the English  resw file as PRI Resource, and set the other one to "None", I can upload the generated package to the store!

    My Mapping file starts like this:

    [ResourceMetadata]
    "ResourceDimensions"	"language-en"
    "ResourceId"	"English"
    
    [Files]
    etc...

    I can't find any documentation saying how to configure the mapping file to support multiple lang resources...

    I tried putting the other language (which is French) this way:

    [ResourceMetadata]
    "ResourceDimensions"	"language-en"	 "language-fr"
    "ResourceId"	"English"
    
    [Files]
    //etc...

    but it doesn't work either.

    Do you know if there is any documentation on mapping file generation?

    Thanks.

    Friday, March 13, 2015 2:43 PM
  • I Finally found what was causing this "Error 3117".

    First, I didn't need the [ResourceMetadata] in my mapping file.

    Second, one of my PCL used in the project was using a resx file as a PRI Resource but I did put this file in my mapping file. This file was not used in code, so I removed it from the PCL and the generated appx file (using with multiple lang resources) is now accepted by the Store!

    • Marked as answer by ChickenMythic Monday, March 16, 2015 11:02 AM
    Monday, March 16, 2015 11:02 AM