ClickOnce 部署“激活失败”FileNotFoundException
Posted
技术标签:
【中文标题】ClickOnce 部署“激活失败”FileNotFoundException【英文标题】:ClickOnce deployment "Activation failed" FileNotFoundException 【发布时间】:2012-04-01 10:27:56 【问题描述】:我刚刚为 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)
当然,它并没有准确地告诉我它正在寻找哪个文件失败了。我被这件事难住了!
【问题讨论】:
【参考方案1】:至少有少数人能够通过清除所有 ClickOnce 数据并重新安装来解决此问题,并将其归咎于损坏的文件存储。
请参阅此MSDN forum post 了解更多信息。
【讨论】:
我在解决问题时确实尝试过。甚至将它安装在没有安装 ClickOnce 应用程序的新机器上。没有任何效果。疯狂地弄乱发布设置并在现有版本号之上发布,然后重新安装似乎已经奏效。我希望我能知道是哪种设置组合导致/解决了问题【参考方案2】:对我来说,以下程序通常有效:
从程序和功能控制面板恢复到以前的版本 从安装 URL http://...在 IE 中运行 install ...【讨论】:
【参考方案3】:我刚刚遇到了这个问题。我们公司正在更改域中,用户的计算机在域 B 中,但点击一次应用程序仍在域 A 中的共享驱动器上。
将文件复制到计算机并从那里安装允许应用程序运行。
【讨论】:
以上是关于ClickOnce 部署“激活失败”FileNotFoundException的主要内容,如果未能解决你的问题,请参考以下文章