VisualStudio.com can't load the temporary UWP certificate during builds

后端 未结 6 1220
轮回少年
轮回少年 2021-02-02 16:27

I set up my Visual Studio Team Service account to clone my private GitHub repo and build the Windows UWP application anytime I queue a build. The cloning works without any issue

6条回答
  •  梦谈多话
    2021-02-02 16:55

    I solved this with the "secure files" feature: https://docs.microsoft.com/en-us/azure/devops/pipelines/library/secure-files?view=vsts

    1. In the build pipeline, there's a "library" tab. I added the pfx (that's excluded from source control) as a file there.
    2. I then added "download secure file" as a build task (https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/download-secure-file?view=vsts). Note the environment variable in the documentation (currently $env:DOWNLOADSECUREFILE_SECUREFILEPATH)
    3. I then added a command line task to move the file to where it was expected. So the command was move %DOWNLOADSECUREFILE_SECUREFILEPATH% FolderOfMyProject

    Now it behaves as though the certificate were checked in.

提交回复
热议问题