Forum Discussion

wangli2230's avatar
wangli2230
Copper Contributor
Apr 16, 2021
Solved

MSIX Packaging Tool usage issues

Please see this post https://docs.microsoft.com/en-us/answers/questions/359851/msix-packaging-tool-usage-issues.html#answer-360194

 

please help me, thanks 

 

 

  • Chacon's avatar
    Chacon
    Apr 19, 2021

    Hi wangli2230 

     

    Are you the developer of the application you are trying to package?

     

    If that is the case, the MSIX Packaging Tool may not be the right tool to use. We recommend you create your package directly from source code, using a Windows Application Packaging Project or MakeAppx.exe.

     

    The MSIX Packaging Tool is intended to package applications using their installers, not the applications themselves, and is intended for scenarios where you do not have access to the source code. It will execute the installer and see what files it creates. The applications listed in the "First launch tasks" step will be those whose executable files (.exe) were created by the installer (and have a shortcut). I believe your application was not listed because you used your app's .exe instead of an installer for it.

     

    The "App packager error" that you see is because the tool detected an app manifest AppxManifest.xml but the tool auto generates one from the data it collects, and that causes a conflict. Since you already have an AppxManifest.xml, you probably can use it to create your package without the MSIX Packaging Tool.

6 Replies

  • To troubleshoot, I would suggest not adding the installer in the top field on the "Choose the installer you want to package" page of the wizard. If you leave this blank, then when you get to the "Installation" page you can start the installer by hand (from file explorer or command prompt). Make sure that it installs properly and that you can see a shortcut either on the start menu or desktop. Then click the next button and the entry should appear.
    • wangli2230's avatar
      wangli2230
      Copper Contributor

      Tim Mangan 

       

      "your application writes to a log file that you put in the same directory as your exe" will be automatically redirected to the appData directory? Or do we need to change our code to write logs to the appData directory?

       

      Using the msix packaging tool, do we still need to modify the code to adapt to uwp?

       

       

      Reference: https://docs.microsoft.com/en-us/windows/msix/packaging-tool/know-your-installer

      • Chacon's avatar
        Chacon
        Icon for Microsoft rankMicrosoft

        Hi wangli2230 

         

        Are you the developer of the application you are trying to package?

         

        If that is the case, the MSIX Packaging Tool may not be the right tool to use. We recommend you create your package directly from source code, using a Windows Application Packaging Project or MakeAppx.exe.

         

        The MSIX Packaging Tool is intended to package applications using their installers, not the applications themselves, and is intended for scenarios where you do not have access to the source code. It will execute the installer and see what files it creates. The applications listed in the "First launch tasks" step will be those whose executable files (.exe) were created by the installer (and have a shortcut). I believe your application was not listed because you used your app's .exe instead of an installer for it.

         

        The "App packager error" that you see is because the tool detected an app manifest AppxManifest.xml but the tool auto generates one from the data it collects, and that causes a conflict. Since you already have an AppxManifest.xml, you probably can use it to create your package without the MSIX Packaging Tool.

      • The error (App Packaging Failure with attached log file) looks unrelated to your other issues. Something went wrong when you packaged. The clue is the line in the log file:

        MakeAppx : error: You can't add both "%UserProfile%\AppData\Local\Packages\Microsoft.MsixPackagingTool_8wekyb3d8bbwe\LocalState\DiagOutputDir\Logs_6\22brdjze.0us.Manifest" and "%UserProfile%\Desktop\aaa\appxmanifest.xml" to the output file as "appxmanifest.xml".

        Just revert the VM and try again.

Resources