Search code examples
c#msbuildclickoncetfsbuildazure-devops

VSO Build agent failing with missing pfx


I'm using the VSO build agent to compile a clickonce project. We have a certificate for signing the manifest, however msbuild keeps failing due to the certificate not being in the user's certificate store. The certificate is password protected. I think the vso build agent runs under my credentials on the server (since I installed it), but I am not sure. I installed the certificate under my credentials and it still fails. I even tried to install the certificate in the local machine store and it still failed. enter image description here

How can I get this build to pass if the certificate is the only issue?


Solution

  • After further investigation I found that the vsoAgent service was installed under the user credentials devtools. Then I recalled setting up that user specifically for the build agent. I logged in as that user and installed the .pfx certificate needed for clickonce using these instructions. The original error was replaced with something more generic "Unable to find manifest signing certificate in the certificate store" and after a clean build I got "SignTool.exe not found". I followed these instructions and now my issue is resolved.