2013-04-03 112 views
4

我知道这是一个非常普遍面临的问题。但是,有一点区别,我的WPF安装完美,可以在Windows 7和Windows 8操作系统上运行。但是,当试图在运行Windows XP的虚拟机上安装时,会出现以下错误:Manifest可能无效或文件无法打开。

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

平台版本信息

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) 

组件存储事务详细

没有交易资料。

  • 我有一个有效的密钥
  • 我已经安装了多台电脑上重新签订了应用程序并将其安装并正常工作。

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

回答

0

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

SignatureDescription could not be created for the signature algorithm supplied

没有WinXP的机器上会表明您也遇到了类似的问题之前,有几台机器上安装成功合并消息的高亮部分 - WinXP的不知道该密码algorithmn规定您用来签署clickonce的证书。

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

0

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

2

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

3

我能够通过删除清单的签名来解决我的问题。
如果右键单击项目并转至属性,然后至签名选项卡;取消选中签署ClickOnce清单签署大会
我不知道这是什么一样在安全性方面,但之后我删除这些选项来安装我的应用程序。

+1

奇怪的是,当我不勾选此框,然后按F7重建项目,盒子奇迹般地再次变为打勾。我不能“保持”它没有挑战! –

+0

如果你不签字每个人都安装它必须要经过多个对话窗口上的坚持,他们信任你。您可以在内部应用程序中使用它,但不能在客户安装的应用程序中使用。 – user3141326

-1

我曾经对自己用的Visual Studio 2012构建和部署XP的机器上的所有关键更新(安装SP3和Windows安装程序4.5)WinForms应用程序相同的问题。我也必须通过转到我的项目的“属性”页面上的[签名]选项卡来将我的应用程序更改为未签名。我未选中两种: [签署点击一个清单]和[登录大会。在启用签名的情况下,Windows 7计算机上安装的应用程序也相同。

+3

-1表示重复答案 – kad81

0

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