Search code examples
azure-devopsmsix

MSIX: App installation failed with error message


I created an MSIX package using the steps in this article https://learn.microsoft.com/en-us/windows/msix/desktop/azure-dev-ops in my azure devops account.

<?xml version="1.0" encoding="utf-8"?>
<AppInstaller
    Uri="file://shares/Intranet/Dev/DotnetCore/DotnetCoreInstaller.appinstaller"
    Version="1.0.12.0" xmlns="http://schemas.microsoft.com/appx/appinstaller/2017/2">
    <MainPackage
        Name="57d2f575-7f7d-4529-badd-249f9e6e79b8"
        Version="1.0.12.0"
        Publisher="CN=21st Mortgage Corporation, O=21st Mortgage Corporation, L=Knoxville, S=Tennessee, C=US"
        Uri="file://21stmortgage/shares/Intranet/Dev/DotnetCore/DesktopApp.msix" />
    <UpdateSettings>
        <OnLaunch
            HoursBetweenUpdateChecks="0" />
    </UpdateSettings>
</AppInstaller>

I also added .appinstaller file as shown in the above article. When I click on the .appinstaller file to install the app on the target machine, I get the below error.

App installation failed with error message: The package full name returned from the AppxManifest (57d2f575-7f7d-4529-badd-249f9e6e79b8_1.0.12.0_x64__y43p6npyeryve) does not match the name generated from the AppInstaller (57d2f575-7f7d-4529-badd-249f9e6e79b8_1.0.12.0_neutral__y43p6npyeryve). Please ensure that the package attributes specified in the .appinstaller file match the package attributes referenced in file://shares/Intranet/Dev/DotnetCore/DesktopApp.msix. (0x8008020c)


Solution

  • It looks like you need to set the ProcessorArchitecture attribute for MainPackage property in your .appinstaller file.

    If the ProcessorArchitecture attribute is not set, its default value neutral will be used. See here for more information.

    See below set ProcessorArchitecture to x64, as the full name returned from the AppxManifest is (...._1.0.12.0_x64__...)

    <MainPackage
            Name="57d2f575-7f7d-4529-badd-249f9e6e79b8"
            Version="1.0.12.0"
            Publisher="CN=21st Mortgage Corporation, O=21st Mortgage Corporation, L=Knoxville, S=Tennessee, C=US"
            Uri="file://21stmortgage/shares/Intranet/Dev/DotnetCore/DesktopApp.msix" 
            ProcessorArchitecture="x64"/>