Clickonce签名的应用程序失败,显示为“计算的哈希值与清单中指定的哈希值不同".法师无法解决问题 [英] Clickonce signed application fails with "has a different computed hash than specified in manifest". Mage fails to resolve issue

查看:790
本文介绍了Clickonce签名的应用程序失败,显示为“计算的哈希值与清单中指定的哈希值不同".法师无法解决问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好几天以来,我一直在为此苦苦挣扎.我看过其他帖子,例如 ClickOnce部署错误:不同计算出来的哈希值比清单中指定的值好,但解决方案似乎对我不起作用.

I've been really struggling with this one for days. I've seen other posts like ClickOnce Deployment Error: different computed hash than specified in manifest, but the solutions do not seem to work for me.

我有一个有效的代码签名证书,并且已经使用它对我的ClickOnce应用程序签名了几个月.我意识到我没有对可执行文件和dll本身进行签名,所以我尝试这样做.现在,每次我发布并运行setup.exe时,它都会失败并显示:文件xxxxxx.dll具有与清单中指定的不同的计算出的哈希值."

I have a valid code signing certificate, and have been using it to sign my ClickOnce application for months. I realized I wasn't signing the executable and dlls themselves, so I attempt to do so. Now every time I publish and run the setup.exe, it fails with: "File, xxxxxx.dll, has a different computed hash than specified in manifest."

如果我不签名exe和dll,则可以重新部署.在发布之前,我确保exe/dll的所有副本均已在所有目录(Target,Obj)中签名.我尝试使用Mage/MageUI,但没有成功.是否可以配置没有签名代码的ClickOnce安装,然后发布签名代码?似乎合乎逻辑,但也许我缺少一些东西.

If I do not sign the exe and Dlls, I can redeploy. I made sure all copies of the exe/dlls are signed in all directories (Target, Obj) before publishing. I've tried using Mage/MageUI but have had no success. Is it possible to configure a ClickOnce install without signed code, then publish signed code? Seems logical, but perhaps I am missing something.

谢谢, 格雷格

推荐答案

您是否有可能尝试部署WPF应用程序并使用Visual Studio 2012或更高版本?如果是这样,则必须在项目文件中使用"AfterCompile"设置对应用程序进行签名,否则最终将导致哈希不匹配.

Is there any chance you are trying to deploy a WPF application and using Visual Studio 2012 or later? If so, you have to use the "AfterCompile" setting in your project file to sign the application, or you end up with the hash mismatch.

请参阅以下stackoverflow文章: SignTool不使用SHA256签名ClickOnce应用,仅使用SHA1

See this stackoverflow post: SignTool Not Signing ClickOnce App Using SHA256, Only Uses SHA1

与Robin出色的博客解决方案的链接: http://robindotnet .wordpress.com/2013/04/14/windows-8-and-clickonce-the-definitive-answer-revisited/

Which links to Robin's excellent blog solution: http://robindotnet.wordpress.com/2013/04/14/windows-8-and-clickonce-the-definitive-answer-revisited/

这篇关于Clickonce签名的应用程序失败,显示为“计算的哈希值与清单中指定的哈希值不同".法师无法解决问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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