How to sign MSIX package with certificate that accepted on Windows Dev Center

996 Views Asked by At

I'm trying to publish an app to Windows Store using Azure Pipelines, the problem is the self-signed certificate is not accepted on the store, while I can publish the package using Visual Studio.

How can I make it work.

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'
    msbuildArgs: '/p:AppxBundlePlatforms="$(buildPlatform)" 
                  /p:AppxPackageDir="$(appxPackageDir)" 
                  /p:AppxBundle=Always
                  /p:UapAppxPackageBuildMode=StoreUpload
                  /p:AppxPackageSigningEnabled=true
                  /p:AppxPackageOutput=$(Build.ArtifactStagingDirectory)\***.msix'
  displayName: 'Package the App'


- task: store-flight@0
  inputs:
    serviceEndpoint: 'PublishToWinStore'
    appId: '***'
    flightName: 'Beta'
    packagePath: '$(Build.ArtifactStagingDirectory)\***.msix'
    force: true
    skipPolling: false
1

There are 1 best solutions below

3
Hugh Lin On

For this issue , as stated in the documentation:

To sign the MSIX (or .appx) package the pipeline needs to retrieve the signing certificate. To do this, add a DownloadSecureFile task prior to the VSBuild task. This will give you access to the signing certificate via signingCert.

- task: DownloadSecureFile@1
  name: signingCert
  displayName: 'Download CA certificate'
  inputs:
    secureFile: '[Your_Pfx].pfx'

For details ,please refer to the link mentioned by Access Denied in comment.