ClickOnce Manifest具有无效的子项 - 但xml匹配旧的已发布的清单

Tom*_*ock 5 c# wpf clickonce manifest visual-studio-2012

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

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

+ Exception reading manifest from <APPPATH>.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....
Run Code Online (Sandbox Code Playgroud)

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

有什么建议?

pic*_*rap 6

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

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
  <!-- A list of the Windows versions that this application has been tested on and is
       is designed to work with. Uncomment the appropriate elements and Windows will 
       automatically selected the most compatible environment. -->
  <!-- Windows Vista -->
  <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
  <!-- Windows 7 -->
  <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
  <!-- Windows 8 -->
  <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
  <!-- Windows 8.1 -->
  <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
  <!-- Windows 10 -->
  <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
Run Code Online (Sandbox Code Playgroud)

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

  • 只需删除对我有用的 Vista 条目。&lt;supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" /&gt; (5认同)

use*_*710 -3

clickonce 有它自己的头痛之处。特别是如果您对清单进行任何更改。对我来说,最好的工作流程是,在更改清单时,关闭 VS,然后启动它,清理项目,构建,重新启动 VS,干净重建。发布新的 clickonce 包后,请勿更改文件夹中的任何内容。请勿添加、删除或更新任何内容。一旦您更改文件夹内的任何内容,它就会停止工作。