Signtool error - pfx file not found
I have the following line in the Build Script(.bat file) :
SignTool.exe sign /f <Path of the .pfx file> /p "password" /t http://timestamp.verisign.com/scripts/timestamp.dll /v <path of the file to be signed>
It works fine in the Teamcity server if run from the command line. But when the build script runs as part of the build pipeline, the following error is thrown:
SignTool Error: File not found:
I have confirmed that there is no issue with the Path of the file. Tried adding echo statements before this line as suggested in other forums and still no change. The same error is shown. Any suggestions ? Thanks.
Teamcity version - 2018.1.3
Please sign in to leave a comment.
Hi Abinash,
builds aren't carried out on the TeamCity server but on the TeamCity agent, which could be on a separate machine. Also make sure that the PATH environment variable is properly defined for the user running the agent's process, otherwise it won't be able to find the SignTool tool.
Also, echo lines aren't (or shouldn't be) to "fix" the issue, but to check whether it's being run and debug, because they post messages to the build log.
In this case, the Teamcity agents are running on the server itself. And the suggestions did not help.
This is what solved the issue: https://youtrack.jetbrains.com/issue/TW-55093
I think it should be documented in TeamCity as a Known limitation that the agent cant use file based certificate. It will save a lot of time.