clickonce – “Manifest XML签名无效”在客户端机器上,但在开发人员计算机上正常工作

在工作中,我们有一个ClickOnce应用程序,当客户端尝试安装时,抛出异常:
  • Exception reading manifest from file:/FILEPATH: the manifest may not be valid or the file Could not be opened.

    Manifest XML signature is not valid.

    SignatureDescription Could not be created for the signature algorithm supplied.

为了解决这个问题,我们最终使用了另一个证书文件,它工作正常(清空清单)。

但是我们不能理解为什么它会在开发人员机器中安装应用程序(即使没有使用应用程序的开发人员),但是它不适用于客户机器?

我们没有很多关于如何创建证书或ClickOnce包的信息,因为执行它的人已经离开,没有留下相关文档。

所使用的证书没有密码,普通用户没有管理员权限。

从Stack Overflow问题Manifest XML signature is not valid,我可以猜测,问题可能是他们创建了项目和证书与.NET Framework 4.5,然后当他们设置应用程序运行与.NET Framework 4.0,他们没有改变签名算法。但是,我认为它不应该为开发人员工作。

任何洞察你可以给我将非常感谢。

更新:从Visual Studio 2013 Update 3修复。尝试从该版本的VS或更高版本发布您的应用程序。

一个答案:

这是因为你的开发者机器安装了.NET 4.5,而你的客户机只安装了.NET 4.0。 .NET 4.0客户端机器无法读取清单,因为他们期望SHA-1,而.NET 4.5开发人员机器可以。

有关其他上下文,请参阅this blog post

This change is due to the fact that we stopped using legacy certificates as default (SHA-1) in NetFX4.5 to sign manifest and instead,use newer version (SHA-256),which is not recognized by NetFx4.0 runtime. Therefore,while parsing the manifest,4.0 runtime complains of an invalid manifest. For legacy frameworks,when we try to run a ClickOnce app on a Box that does not have targeted runtime,ClickOnce pops up a message to user saying “you need xxxx.xx runtime to run this app”. But starting .NET 4.5,if a 4.5 ClickOnce app is run on the Box with only .NET 4.0 installed,the message complains about an invalid manifest. In order to resolve the issue,you must install .Net Framework 4.5 on the target system.

尝试使用SHA-1证书而不是SHA-2证书签署清单。

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念