Where to find logs for failed msix installation?

1k Views Asked by At

Situation

We created and signed a MSIX package of our .NET MAUI app for distribution outside MS Store and Installation with App-Installer.

Problem

While (up to now) most of testing users don`t have any problems with installation with MS App-Installer, in one case installation fails showing this message: "App Installer failed to install package dependencies. Ask the developer for -package[!]."

Tries

Because I don't have a clue, what package exactly could be missing, I searched for some error logs / error codes in Event Viewer (here: Application and Services Logs -> Microsoft -> Windows -> AppxDeployment-Server), following these instructions , but could not find anything in AppxDeployment-Server.

Could anyone please tell me, where else to find logs for failed msix installation? Or does maybe anyone could give me a suggestion, what could be the reason for the failing installation?

2

There are 2 best solutions below

0
Mirh On BEST ANSWER

We found a solution that works in our context:

  • Getting Logs: While a failing Installation with AppInstaller did not leed to logs in Event Viewer, Installation with Power Shell was more verbose and so we could figure out that missing dependency was WindowsAppRuntime.
  • Adding WindowsAppRuntime: If users are logged in MS Store while performing installation of the app, missing dependency is fulfilled automatically by Store. For we would like to allow an installation outside MS Store we had to find another solution. So we added following lines to our *.csproj for using WASDK as self-contained:
  • <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained> and
  • <Target Name="_RemoveFrameworkReferences" BeforeTargets="_ConvertItems;>_CalculateInputsForGenerateCurrentProjectAppxManifest"> <ItemGroup> <FrameworkSdkReference Remove="@(FrameworkSdkReference)" Condition="$([System.String]::Copy('%(FrameworkSdkReference.SDKName)').StartsWith('Microsoft.WindowsAppRuntime.'))" /> </ItemGroup> </Target>

as described here. Unfortunaley this causes a error "The platform 'AnyCPU' is not supported for Self Contained mode" so we had to add "-p:Platform=... option to our dotnet publish command as described here. For being able to start our program in VS we also had to add <Platforms>AnyCPU;x64</Platforms> solution wide to all of the *.csproj files with VS Configuration Manager.

6
Guangyu Bai - MSFT On

When there are issues with the installation, you can investigate the artifacts provided by AppInstaller.

First, AppInstaller provides error code failures. If the error code for any failure is not sufficient to determine what is wrong, the AppInstaller also logs all interactions to the Event Viewer.

You will find the logs here: Application and Services Logs -> Microsoft -> Windows -> AppxDeployment-Server.

You can use the Event Viewer or PowerShell to access those events. To learn more about how to view the events, see Troubleshooting packaging, deployment, and query of Windows apps.

To learn more about AppInstaller troubleshooting, see Troubleshoot Appinstaller Issues.