UWP app signing fails since vmImage-2022

Copper Contributor

When building an app on devops pipeline using this (part of the yaml) we recently are getting errors


- task: VSBuild@1
platform: 'x64'
solution: '$(solution)'
configuration: '$(BuildConfiguration)'
msbuildArgs: '/p:AppxBundlePlatforms="$(buildPlatform)"


While windows-latest was still windows 2019 everything worked, but since it got upgraded to windows 2022 the build is failing with the error.



##[error]C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VisualStudio\v17.0\AppxPackage\Microsoft.AppXPackage.Targets(4745,5): Error APPX1204: Failed to sign 'D:\a\1\s\src\Aucxis.Polaris.App.UWP.Gate\bin\x64\Release\Aucxis.Polaris.App.UWP.Gate_1.1.2.2050_x64.appx'. SignTool Error: The /p option requires the /f option.


Now since signing is happing as part of the VSBuild@1 I'm not sure ow to proceeed in making things work again for windows-2022 images. For now i can continue building using windows-2019 images, but preferably we'dd go forward with the latest images.

6 Replies
We are experiencing the same issue... the /f options is actually there but it doesn't work...
We also resorted to usign windows-2019 for now.
Same issue here. Haven't touched anything in the pipeline in 4 months, now it's broken.
Same error since (at least) last week, I changed windows-latest back to windows-2019 for the pipeline to work...



We sign with signtool command line instead

          - task: CmdLine@2
            displayName: 'Signtool.exe ${{ parameters.application_package }}'
                script: |
                    "C:\Program Files (x86)\Windows Kits\10\App Certification Kit\signtool.exe" sign /fd sha256 /a /f "$(signing_certificate.secureFilePath)" /p ${{ parameters.windows_cert_password }} "$(build.artifactStagingDirectory)\${{ parameters.artifact_folder }}\${{ parameters.application_package }}"


@BartAucxis I tested again this week and it's working now with windows-latest.