3

The error message when running the msbuild.exe command in the pipeline:

Error MSB3482: An error occurred while signing: SignTool.exe was not found at path D:\Agent_work\16\s\My.App\signtool.exe.

But in the MSBuild Parameters I specified the following path:

-p:SignToolPath="C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x86\signtool.exe"

Why does this still throw the same error?

Matthias Herrmann
  • 2,650
  • 5
  • 32
  • 66
  • 1
    A topic starter in [this thread](https://developercommunity.visualstudio.com/comments/638589/view.html) has a similar problem and this is how it was resolved: `The issue was that I have the msbuildArchitecture set to x64 and when it is set to that it can't find the signtool.exe. Switching it to x86 everything built and the publish worked successfully.` Could it be your case as well? – Yan Sklyarenko Mar 10 '20 at 16:45
  • Yep switched it to x86. This was the issue - thanks. But now it prompts me for the password of the *.pfx File on the build machine. That should work automatically. – Matthias Herrmann Mar 11 '20 at 07:54
  • 1
    @Matthias Herrmann You can refer to this [case](https://stackoverflow.com/questions/50063626/vsts-build-fails-with-msb3325-cannot-import-pfx-key-file) for the pfx issue. – Hugh Lin Mar 11 '20 at 08:18

1 Answers1

0

According to the signtool.exe path you gave, your Windows SDK Signing Tools should be installed.Please make sure again that the file is available there. Does this issue still happen when running on local visual studio?

It seems that you use the private agent to run, if so, you can check the msbuildArchitecture mentioned by Yan Sklyarenko in the comment.This may also cause this error.

enter image description here

If this is not the case, you can share your task definition.

Hugh Lin
  • 17,829
  • 2
  • 21
  • 25
  • The issue was the build architecture. I changed that and now it works fine. I was prompted for the certificate password of the build agent because there was a local security policy enabled - system crypthography: Force strong key protection - "User must enter a password" – Matthias Herrmann Mar 11 '20 at 08:20