MSIX Packaging Tool usage issues

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.

@Tim Mangan 



Please help me see what is the problem


@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?





The guidance on the page you reference is for developers with access to source code.

When packaging up an app with the packaging tool, this does not automatically address the issue, however by also adding in the Package Support Framework (PSF) as part of the package, and using the FileRedirectionFixup the issue can usually be overcome without source code modifications.

This can be done by using the packaging tool in combination with the free PsfTooling app. There is also now a paid for tool called TMEditX that can post process your captured package to inject the Psf/Frf.

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.

best response confirmed by wangli2230 (New Contributor)

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.