0

My idea are build my project in TFS using MSBUILD to get .msi files. After that i need to sign .msi file with .pfx file. Then i try to add task with Authenticode Sign which i found in https://marketplace.visualstudio.com/items?itemName=jabbera.authenticode-sign i get an error : node:4568) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Not found signtool.exe: d:\a\_tasks\authenticode-sign_752fe535-ed47-4c2c-afcf-0778adb0bb12\0.0.2\x64\signtool.exe , my .pfx file is in project dir. my configuration of this tool are : enter image description here

Maybe whom know how can i fix it ? Please suggest!

Андрей Ка
  • 756
  • 4
  • 14
  • 33

2 Answers2

0

According to the error message "Not found signtool.exe".

When missing ClickOnce Publishing Tools component in your Visual Studio installation will cause the error. So, you need to check whether the feature ClickOnce publishing Tools is installed for VS in the build agent machine.

Try following below steps to fix this issue:

  1. Go to “Add/Remove Programs”
  2. Find “Visual Studio”. Click “Change”
  3. Select “Click Once Publishing Tools”
  4. Click “Next” and then click “Update”

If that still not work, just try to also install the feature "Tools and Windows SDK", then try it again.

enter image description here

Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55
  • Hi , thanks for reply , if i configure it , in tfs server then i build my project it will works? Look, i have sign certificate, and i need sign my .msi file , it possable or i need put sign in to my project and his build already signed file? – Андрей Ка Sep 20 '17 at 06:11
  • @Andrej That's just the troubleshoot based on your problem. Normally it should works, you need to import the certificate into agent machine's personal store. For the extension you used, you can have a try for above suggestions, any new issues you can open new thread for tracking here. This. A similar thread for your reference: https://stackoverflow.com/questions/46200289/getting-an-error-occurred-while-signing-failed-to-sign-file-exe-signtool-error – Andy Li-MSFT Sep 20 '17 at 06:44
  • Look, but in yours opinion how do you think if I put a certificate in the project, will it attach to the .msi file when it builds up, or does it wake up attached only to the project? my question - is it simple, do I need to attach it to the installation of the .msi file or simply attach it to the project and when it builds it itself on TFS , what does it need? My signtool is adjusted to visual studio, but I need it on TFS. – Андрей Ка Sep 20 '17 at 06:52
  • The questions are board and away from the original question. If you want to sing with TFS, you have to import the certificate into agent machine's personal store. You can put the certificate in the project, the agent will get the source including the certificate to local machine first, then run the sign command. Make sure the signtool works in VS locally, then in TFS, it will run sign command on agent machine, so the signtool should be also adjusted on the anent machine. https://msdn.microsoft.com/en-us/library/windows/desktop/jj835835%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396 – Andy Li-MSFT Sep 21 '17 at 07:35
  • Andy-MSFT yes!! it's that what i searching !! – Андрей Ка Sep 21 '17 at 07:38
0

You can add a new task "Command Line", give the Tool as "SignTool" and provide the "Working Folder" as C:\Program Files(x86)\Windows Kits\10\App Certification Kit (or whatever the path of signtool is).