MicrosoftDocs / msix-docs

repository for msix content
Creative Commons Attribution 4.0 International
59 stars 114 forks source link

The MSIX package signing cannot sign the .msix format package #337

Open wyt1206 opened 2 years ago

wyt1206 commented 2 years ago

When followed the instructions from MSIX Packaging Extension - MSIX | Microsoft Docs to package and sign .msix file.

steps: - task: MSIX.msix-ci-automation-task-dev.msix-packaging.MsixPackaging@1 displayName: 'MSIX build and package' inputs: outputPath: '$(Build.ArtifactStagingDirectory)\MyApp.msix' solution: MyUWPApp.sln buildPlatform: x64 updateAppVersion: true manifestFile: MyUWPApp/Package.appxmanifest appVersion: 2.0.0.0 appPackageDistributionMode: SideloadOnly msbuildArchitecture: x64

steps: - task: MSIX.msix-ci-automation-task-dev.msix-signing.MsixSigning@1 displayName: 'Sign MSIX package' inputs: certificateType: base64 encodedCertificate: '$(kvtestcert)'

Got the error as shown below. The publisher in the manifest matches the publisher on the cert. SignTool Error: This file format cannot be signed because it is not recognized. SignTool Error: An error occurred while attempting to sign: D:\a\1\a\myapp.msix

If changed the ADO “MSIX build and package” task output path to xxx.msixbundle, the .msixbundle file can be signed successfully.

ASK: In the documentation, the .msix and .msixbundle files both can be signed as shown below. But from my tests, .msix file cannot be signed due to the format cannot be recognized. Please help have a look at this issue to see if it is a documentation issue. Many thanks!


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.