签名时出错:无法签署bin \Debug \app.publish \\ program.html。 SignTool错误:无效选项:/ fd [英] An error occurred while signing: Failed to sign bin\Debug\app.publish\\program.exe. SignTool Error: Invalid option: /fd

查看:1166
本文介绍了签名时出错:无法签署bin \Debug \app.publish \\ program.html。 SignTool错误:无效选项:/ fd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用SHA256签署一个使用ClickOnce和证书的Windows窗体应用程序。这会出现以下错误:


签名时出错:无法签署bin \Debug \app.publish \\ setup.exe。 SignTool错误:无效选项:/ fd



我找到了类似问题的人,但网上关于此问题的信息却很少。 / p>

https://stackoverflow.com/questions/37205270/error-attempting-to-sign-assembly-with-sha256-in-visual-studio


https://stackoverflow.com/questions/44506082/which-version-of-signtool-is-visual-studio-2017-using





如果我使用SHA1或没有签名,错误就会消失,但遗憾的是这不是一个选项。我已经验证在VS2017安装程序中选择了ClickOnce发布工具。如果我在VS2017命令行中写入'where signtool',我会获得位置:


C:\Program Files(x86)\ Windows Wits \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ signtool.exe


C:\Program Files(x86)\ Windows Wits\10\bin\10.0.16299.0 \ x86\signtool.exe



非常感谢任何帮助!

解决方案

您好cbwestl,


>> SignTool错误:无效选项:/ fd


错误说/ fd无效。我在MSDN中检查了
这个文件有关SignTool.exe的信息(签名工具)
,表示:










签名命令选项

描述









/ fd

            指定用于创建文件签名的文件摘要算法。默认是SHA1。

这就是为什么你可以使用SHA1而不是SHA256。


问候,


Stanly


I am trying to sign a Windows Forms application that uses ClickOnce with a certificate using SHA256. This gives the following error:

An error occurred while signing: Failed to sign bin\Debug\app.publish\\setup.exe. SignTool Error: Invalid option: /fd

I have located people having similar issues, but there is surprisingly little information on this issue online.

https://stackoverflow.com/questions/37205270/error-attempting-to-sign-assembly-with-sha256-in-visual-studio

https://stackoverflow.com/questions/44506082/which-version-of-signtool-is-visual-studio-2017-using


The error disappears if I use SHA1 or no signing, but this is unfortunately not an option. I have verified that ClickOnce Publishing Tools is selected in the VS2017 installer. If I write 'where signtool' into the VS2017 command line, I get locations:

C:\Program Files (x86)\Windows Kits\10\bin\x86\signtool.exe

C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x86\signtool.exe

Any help is greatly appreciated!

解决方案

Hi cbwestl,

>>SignTool Error: Invalid option: /fd

The error says /fd is invalid. I checked this document in MSDN about SignTool.exe (Sign Tool), that says:

Sign command option Description
/fd                        Specifies the file digest algorithm to use for creating file signatures. The default is SHA1.

So this is why you can use SHA1 instead of SHA256.

Regards,

Stanly


这篇关于签名时出错:无法签署bin \Debug \app.publish \\ program.html。 SignTool错误:无效选项:/ fd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆