ClickOnce部署"激活失败" FileNotFoundException异常

时间:2012-03-15 20:36:27

标签: c# deployment clickonce filenotfoundexception

我刚刚为clickonce应用程序部署了一个更新。我已经部署了几十个更新,没有任何问题。现在突然间,通过此更新,我的所有用户都报告了此错误:

错误摘要

Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of C:\Users\XXX\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\XXX\XXX\XXX.appref-ms| resulted in exception. Following failure messages were detected:
        + Activation failed.
        + The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

在此操作过程中检测到以下错误。

* [3/15/2012 3:22:34 PM] System.Deployment.Application.DeploymentException (Activation)
        - Activation failed.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.ComponentStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
            at System.Deployment.Application.SubscriptionStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
            at System.Deployment.Application.ApplicationActivator.Activate(DefinitionAppId appId, AssemblyManifest appManifest, String activationParameter, Boolean useActivationParameter)
            at System.Deployment.Application.ApplicationActivator.ProcessOrFollowShortcut(String shortcutFile, String& errorPageUrl, TempFile& deployFile)
            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.IO.FileNotFoundException
        - The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.NativeMethods.CorLaunchApplication(UInt32 hostType, String applicationFullName, Int32 manifestPathsCount, String[] manifestPaths, Int32 activationDataCount, String[] activationData, PROCESS_INFORMATION processInformation)
            at System.Deployment.Application.ComponentStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)

当然它并没有告诉我它正在寻找哪个文件失败。我很难过!

3 个答案:

答案 0 :(得分:5)

至少有几个人能够通过清除所有ClickOnce数据并重新安装来解决这个问题,并将其归咎于损坏的文件存储。

有关详细信息,请参阅此MSDN forum post

答案 1 :(得分:1)

对我来说,以下程序通常有效:

  • 从程序和功能控制面板
  • 恢复到以前的版本
  • 从安装URL http:// ...
  • 在IE中运行安装

答案 2 :(得分:0)

我刚遇到这个问题。我们的公司位于不断变化的域中,用户的计算机位于域B中,但单击一次应用程序仍位于域A中的共享驱动器上。

将文件复制到计算机并从那里安装允许应用程序运行。