ClickOnce Manifest包含无效子项 – 但xml与旧发布的清单匹配

在我的应用上安装更新或全新安装ClickOnce发布时出错。

这种情况发生在未安装应用程序的计算机上以及已安装应用程序的计算机上。 我用于签署项目的pfx文件与以前的版本相同,所以我认为证书不是问题。

+ Exception reading manifest from .exe.manifest: the manifest may not be valid or the file could not be opened. + The element 'assembly' in namespace 'urn:schemas-microsoft-com:asm.v1' has invalid child element 'SignedInfo' in namespace 'http://www.w3.org/2000/09/xmldsig#'. List of possible elements expected: 'dependency' in namespace 'urn:schemas-microsoft-com:asm.v1' as well as 'dependency' in namespace 'urn:schemas-microsoft-com:asm.v2' as well as 'file' in namespace 'urn:schemas-microsoft-com:asm.v1' as well as 'file, configuration, deployment, entryPoint, trustInfo, licensing, migration' in namespace 'urn:schemas-microsoft-com:asm.v2' as well as 'clrClass' in namespace 'urn:schemas-microsoft-com:asm.v1' as well as 'clrClass' in namespace 'urn:schemas-microsoft-com:asm.v2' as well as 'clrSurrogate' in namespace 'urn:schemas-microsoft-com:asm.v1' as well as 'clrSurrogate' in namespace 'urn:schemas-microsoft-com:asm.v2' as well as 'comInterfaceExternalProxyStub' in namespace 'urn:schemas-microsoft-com:asm.v1' as well as 'comInterfaceExternalProxyStub, KeyInfo' in namespace 'urn:schemas-microsoft-com:asm.v2' as well as 'Signature' in namespace 'http://www.w3.org/2000/09/xmldsig#' as well as any element in namespace 'urn:schemas-microsoft-com:asm.v3' as well as 'publisherIdentity' in namespace 'urn:schemas-micr.... 

没有不合适的xml元素或属性,因为将它与旧的发布进行比较可以显示元素没有区别。

有什么建议?

我有同样的问题,它是由显式嵌入的app.manifest中的一个部分引起的:

               

删除此部分(不需要)使单击一次应用程序工作。

clickonce有它自己的头痛。 特别是如果您对清单进行任何更改。 什么certificate了我是最好的工作流程,当对清单进行更改,转向VS然后启动它,清理项目,构建,重新启动VS,清理重建。 发布新的clickonce包后,请勿更改该文件夹中的任何内容。 不要添加,删除或更新任何内容。 一旦你更改了文件夹中的任何内容,它就会停止工作。