.net 如何将支持添加到Windows单击一次应用程序清单中?

.net 如何将支持添加到Windows单击一次应用程序清单中?,.net,clickonce,manifest,.net,Clickonce,Manifest,我正在尝试将supportedOS标记添加到单击一次应用程序清单中。对于常规应用程序,通常的做法是向包含supportedOS标记的项目中添加app.manifest文件,如下所示。我删除了自动生成的单击一次清单中已经包含的所有内容。通常,一次点击应用程序不需要app.manifest,因为它是在发布步骤中自动为您生成的 <?xml version="1.0" encoding="utf-8"?> <assembly manifestVersion="1.0" xmlns="u

我正在尝试将supportedOS标记添加到单击一次应用程序清单中。对于常规应用程序,通常的做法是向包含supportedOS标记的项目中添加app.manifest文件,如下所示。我删除了自动生成的单击一次清单中已经包含的所有内容。通常,一次点击应用程序不需要app.manifest,因为它是在发布步骤中自动为您生成的

<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
      <!-- Windows 7 -->
      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
    </application>
  </compatibility>
</assembly>
要重新创建:您应该能够通过创建一个全新的WPF应用程序来重新创建此错误,而无需编辑。使用项目属性页上“发布”选项卡上的发布向导添加所需的发布信息。您现在应该能够成功发布和安装

更新:删除发生EndValidation错误的“单击一次清单签名”选项

如果您对清单进行签名,则此错误似乎不会发生。相反,我遇到的情况是,它对一个supportedOS标记有效,对两个也有效,但当我尝试添加第三个supportedOS标记时,我遇到了由Blue发布的问题

+ 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' 
+从.exe.manifest读取清单时出现异常:清单可能无效或无法打开文件。
+命名空间“urn:schemas microsoft com:asm.v1”中的元素“assembly”在命名空间中具有无效的子元素“SignedInfo”http://www.w3.org/2000/09/xmldsig#'. 
可能元素的列表应为命名空间“urn:schemas microsoft com:asm.v1”中的“dependency”
问题:有人能告诉我如何正确地将supportedOS信息添加到一次点击应用程序中吗?

请特别参阅Alexy Kozlov关于从兼容性列表中删除Vista guid的最后一个答案

+ 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'