0

Issue Description

I am trying to create MSXI installer for .NET WPF application. I have published the .appinstaller file successfully, but the window below shows when the installer is clicked.

Cannot open app package

Reason: Error in parsing the app package.

Run the installer

Analysis

Open powershell in the installer folder, and then run the command Add-AppPackage .\WapProj.appinstaller

Add-AppPackage : Deployment failed with HRESULT: 0x80073CF0, Package could not be opened.
error 0x8007000D: Opening the package from location WapProj.appinstaller failed.
NOTE: For additional information, look for [ActivityId] cb5dc7f5-042f-0007-e31e-a1cb2f04db01 in the Event Log or use
the command line Get-AppPackageLog -ActivityID cb5dc7f5-042f-0007-e31e-a1cb2f04db01
At line:1 char:1
+ Add-AppPackage .\WapProj.appinstaller
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (D:\Desktop\Proj...oj.appinstaller:String) [Add-AppxPackage], FileNotFoundExc
   eption
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand

According to the message above. Run the command Get-AppPackageLog -ActivityID cb5dc7f5-042f-0000-f20b-b8cb2f04db01, and then we can see the information below

Time                      ID           Message
----                      --           -------
9/26/2024 9:30:20 AM      603          Started deployment Add operation on a package with main parameter
                                       WapProj.appinstaller and Options 0 and 0. See
                                       http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app
                                       deployment issues.
9/26/2024 9:30:20 AM      465          error 0x8007000D: Opening the package from location WapProj.appinstaller failed.
9/26/2024 9:30:20 AM      497          Error 0x80070002: Opening the Msixvc package from location WapProj.appinstaller
                                       failed. Please check whether the Msixvc support services are installed.
9/26/2024 9:30:20 AM      403          error 0x8007000D: Failure to get staging session for: file:///D:/Desktop/Project
                                       s/GitHubAction/MXSITest/WapProj/AppPackages/WapProj.appinstaller.
9/26/2024 9:30:20 AM      404          AppX Deployment operation failed for package  with error 0x80073CF0. The
                                       specific error text for this failure is: error 0x8007000D: Opening the package
                                       from location WapProj.appinstaller failed.

Among the output above, "Please check whether the Msixvc support services are installed." may be the key point.

However, how to check whether the Msixvc support services are installed? If not installed, how to install it?

Reproduction steps

  • Step1: Create a new WPF project (name: WpfApp1) with VS2022.
  • Step2: Add a "Windows Application Packaging Project" (name: WapProj) to the solution.
  • Step3: Add WpfApp1 to the reference of WapProj
  • Step4: Publish the project WapProj locally.
      1. Select the project WapProj. Click Publish-Create App Packages... in the right menu.
      1. Select Sideloading - Next
      1. Yes, select a certificate - Create...- Next
      1. Select architecture "x86" and "x64" - Next
      1. Installer location, set "D:\MSXI" - Creat

Then, it will succeed. Open the folder "WapProj\AppPackages", and the installer file is WapProj.appinstaller. Double click the installer file, and you will get this error.

1 Answer 1

0

I solved it with these two steps, in the end:

  • Step1: Trust the certificate when publishing

    Trust the certicate

  • Step2: Copy the content of the folder AppPackages to the installer location (D:\MSXI)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.