本文介绍了签名时出错:无法签署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



非常感谢任何帮助!

解决方案


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!

解决方案


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

08-23 19:02