清单可能无效或无法打开文件。

我知道这是一个非常普遍的问题。 但是,稍有不同,我的WPF安装完美,可在Windows 7和Windows 8操作系统上运行。 但是,当尝试在运行Windows XP的VM上安装时,会出现以下错误:

无法继续。 应用程序格式不正确。 细节

平台版本信息

Windows : 5.1.2600.196608 (Win32NT) Common Language Runtime : 4.0.30319.1 System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100) clr.dll : 4.0.30319.1 (RTMRel.030319-0100) dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100) dfshim.dll : 4.0.31106.0 (Main.031106-0000) SOURCES Deployment url : file:///S:/K3FrontEnd_NET4/Karacell3.application 

错误摘要

下面是错误的摘要,这些错误的详细信息将在后面的日志中列出。

 * Activation of S:\K3FrontEnd_NET4\Karacell3.application resulted in exception. Following failure messages were detected: + Exception reading manifest from file:///S:/K3FrontEnd_NET4/Karacell3.application: 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. COMPONENT STORE TRANSACTION FAILURE SUMMARY No transaction error was detected. WARNINGS There were no warnings during this operation. OPERATION PROGRESS STATUS * [4/3/2013 2:58:13 PM] : Activation of S:\K3FrontEnd_NET4\Karacell3.application has started. ERROR DETAILS Following errors were detected during this operation. * [4/3/2013 2:58:14 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse) - Exception reading manifest from file:///S:/K3FrontEnd_NET4/Karacell3.application: the manifest may not be valid or the file could not be opened. - Source: System.Deployment - Stack trace: at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri) at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation) at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options) at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl) at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state) --- Inner Exception --- System.Deployment.Application.InvalidDeploymentException (SignatureValidation) - Manifest XML signature is not valid. - Source: System.Deployment - Stack trace: at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s) at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri) --- Inner Exception --- System.Security.Cryptography.CryptographicException - SignatureDescription could not be created for the signature algorithm supplied. - Source: System.Security - Stack trace: at System.Security.Cryptography.Xml.SignedXml.CheckSignedInfo(AsymmetricAlgorithm key) at System.Security.Cryptography.Xml.SignedXml.CheckSignature(AsymmetricAlgorithm key) at System.Security.Cryptography.Xml.SignedXml.CheckSignatureReturningKey(AsymmetricAlgorithm& signingKey) at System.Deployment.Internal.CodeSigning.SignedCmiManifest.Verify(CmiManifestVerifyFlags verifyFlags) at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s) 

组件商店交易细节

没有可用的交易信息。

  • 我用有效的密钥重新签名了申请表
  • 我安装在多台PC上,安装和工作正常。

请帮我列举这个错误的可能原因。

通过删除清单的签名,我能够解决我的问题。
如果右键单击项目并转到属性,然后转到“ 签名”选项卡 ; 取消选中“ 签署ClickOnce”清单签署程序集
我不确定这在安全性方面做了什么,但在删除这些选项后安装了我的应用程序。

我有同样的问题,只是机器没有合适的.Net版本。

我之前看到类似的问题,因为缺少加密提供程序,特定的WIndows操作系统无法“理解”或validation证书哈希的结果,在我的特定情况下,它与使用v3模板生成的X509证书相关clickonce签名。

无法为提供的签名算法创建SignatureDescription

消息的突出显示部分与在WinXP计算机上失败之前在多台计算机上成功安装相结合,表明您也遇到类似问题 – WinXP不知道您使用的证书中指定的加密算法签署clickonce。

我不知道一个很好的解决方案,你会在互联网上找到的正常建议是使用v2模板生成X509而不是v3模板,但这不一定是一个好的解决方案,超出了大多数组织(特别是大多数人使用购买的证书而不是从他们自己的证书颁发机构生成的证书)。

您是否在Windows XP计算机上安装了SP-3,以及所有可用的Windows更新? Microsoft会定期针对证书,受信任的发布者和其他相关信息推出代码更新。

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

对于使用Visual Studio 2012构建并部署在具有所有关键更新(安装了SP3和Windows Installer 4.5)的XP计算机上的WinForms应用程序,我遇到了同样的问题。 我也必须通过转到项目的“属性”页面上的[签名]选项卡来将我的应用程序更改为未签名。 我取消选中:[签署Click One清单]和[签署程序集]。 在启用了签名的Windows 7计算机上安装了相同的应用程序。