Error "Error in parsing the app package." when running .appinstaller from a folder.

New Contributor

Greetings,

 

     Bear with me as I am new to MSIX.  I have an application that has one assembly and one winform exe application that uses the assembly.  I added a MSIX installer project to the solution, and using it as the start up, the application runs fine in debug mode.  In release mode after rebuilding everything, I  republish the MSIX as a sideload, so it can be placed on a shared folder later.  The publishing succeeds, but when I go to test it on another machine, I get the message "Error in parsing the app package."

 

       What exactly does this mean?  Are there any logs to look at? How do you troubleshoot this error being as cryptic as it is?

        I put together a stupidly simply windows app and built a MSIX file around that.  It works with no issues, even after making changes and republishing the MSIX installer.  Could the issue with the other project be the fact I have an assembly and an exe?  Could it be the NuGet packages that each are using?   Any assistance would be appreciated..

 

Thanks

5 Replies
On the machine with the problem, look in the Windows Event Log. "Applications and Services Logs"-->"Microsoft"-->"Windows" and at logs starting with "AppX*". Most likely the "AppxPackagingOM" Operational log will tell you what it didn't like in the AppXManifest.

@TIMOTHY MANGAN  I have looked in AppxDeployment, AppxDeployment-Server and AppxPackagingOM, but I do not see any events for the installer.  I even took the step of re-running it to see if any new entries would be entered, but I didn't see anything.  I am guessing whatever the issue is, it is occurring before it is able to log any event data...  Could it be some sort of permissions issue?

If there is nothing in those logs, it never got the MSIX package opened. If the .appinstaller file was OK and a permissions issue, I would expect your error to appear differently.

You didn't specify how you were installing with the file. I assume PowerShell and you used the Add-AppXPackage with the -AppInstaller argument. I don't remember the minimum OS version for that, manye 21H1, but if the cmdlet doesn't have the -AppInstaller argument then that is your issue.

Otherwise, the error looks like a syntax error in the .appinstaller file.
I am running the .appinstaller directly from Windows Explorer simply by double clicking on it. It was created using the Windows Application Packaging Project in VS 2022. During publishing I am creating an App Package with Sideloading. I made sure not to use AnyCPU but specific CPU's to avoid that issue. The target version is Windows 10, version 2004(10.0; Build 19401) with a Minimum version of Windows 10, version 1903(10.0; Build 18362).

As I mentioned before if I set the start up project of the solution to this installer it runs fine in VS2022 in Debug mode. When I change to release, I build everything separately, and then I publish\build the backage for the installer. If it was a syntax error, I would think I would see it somewhere during this process... Also, I have a simple solution that is just a form with a label, and following the same steps as above, that installer works fine. The solution having issues is a WInform EXE and a custom assembly both of which are using NuGet packages..
Yeah, I think AppInstaller needs 21H1 as the minimum. Try on a newer OS to confirm.