MSBuild SignFile task returning MSB3481: The signing certificate could not be located

邮差的信 提交于 2019-12-09 12:59:53

问题


I recently got a new code signing certificate. I'm using MSBuild's SignFile task to sign an application manifest. For some reason the task is returning:

MSB3481: The signing certificate could not be located.
Ensure that it is in the current user's personal store.

The certificate is definitely in my personal store, I can see it in certmgr.msc. And I believe that I'm logged in as the same user since I'm able to sign the manifest using a different certificate that is in the same personal store. Not sure why this new certificate cannot be found.

I'm even able to use signtool.exe with the new certificate's SHA1 to sign files just fine. But I would really prefer to use our existing MSBuild with the SignFile task. Any ideas what could be going wrong here?

I've also tried importing the certificate with and without the complete certification path.


回答1:


I not sure that this could help, but I remember that if you are copying thumbprint from snap-in field, there is an "invisible" symbol in first position. So this thumbprint with that non-printable can't be located in your store. Try to remove 3-5 symbols from beginning of certificate thumbprint (including quotes) and type them manually.

Also take in account that thumbprint should be all uppercase (despite that property displayed in lowercase).



来源:https://stackoverflow.com/questions/14409465/msbuild-signfile-task-returning-msb3481-the-signing-certificate-could-not-be-lo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!