ClickOnce:值不在预期范围内

时间:2012-10-04 12:53:58

标签: clickonce

我通过ClickOnce分发了一个应用程序。我多次更新,从来没有出现过问题。 自上次更新(次要:标签)以来,当我从帖子运行我的应用程序时,单击一次启动并提示我一个错误:     申请无法启动

当我查看日志时,我收到以下消息:

OPERATION PROGRESS STATUS
* [04/10/2012 13:24:33] : Activation of C:\Users\xxxxxxxxx.appref-ms| has started.
* [04/10/2012 13:24:33] : Performing necessary update check as specified by the deployment.

ERROR DETAILS
Following errors were detected during this operation.
* [04/10/2012 13:24:33] System.ArgumentException
- Value does not fall within the expected range.
- 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)
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)

我已经走过网的长度和宽度,但我找不到解决问题的方法。

我甚至不明白这是什么问题。

我尝试了这个解决方案没有成功: ClickOnce error: Value does not fall within the expected range

这个也没有成功:"Value Does not fall in the expected range" ClickOnce Deployment

感谢您的帮助!

2 个答案:

答案 0 :(得分:4)

如果您尝试在UNC共享上运行clickonce,则可能无效。 我得到了与上面相同的结果,但我只是尝试部署到C:\而不是我们的共享,它运行得很好。另外,请检查以确保您没有任何&您的部署路径中的&符号似乎会破坏它。

另请查看此帖子上要检查的内容列表。 "Value Does not fall in the expected range" ClickOnce Deployment

答案 1 :(得分:1)

这有点延迟,但我发现解决我问题的唯一解决方案就是这个:

  

99.9%的时间,“值不在预期范围内”意味着您有循环引用或对同一程序集的两个不同版本的引用。

从这里开始:https://social.msdn.microsoft.com/Forums/windows/en-US/e6c0a0ca-fbf0-47e2-8681-bc03471d09f6/value-does-not-fall-within-the-expected-range?forum=winformssetup