ClickOnce: Value does not fall within the expected range

南楼画角 提交于 2019-12-10 02:37:35

问题


I have a distributed application via ClickOnce. I updated several times and there has never been a problem. Since the last update (which was minor: a label), when I run my application from a post, click once start and prompt me an error: Application Cannot Be started

When I look at the logs I get the following message:

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)

I have traveled the length and breadth of net, but I have not found a solution to my problem.

I do not even understand what is this problem.

I tried this solution without success: ClickOnce error: Value does not fall within the expected range

And this one too without success: "Value Does not fall in the expected range" ClickOnce Deployment

Thanks for the help!


回答1:


If you are trying to run the clickonce on a UNC share, it may not work. I was getting the same result as yours above, but I just tried deploying to C:\ instead of our share, and it runs just fine. Also, check to make sure you don't have any & ampersands in your deploy path as this seems to muck it up.

Also check out the list of things to check for on this post. "Value Does not fall in the expected range" ClickOnce Deployment




回答2:


This is a bit delayed, but I found the only solution to solve my problem was this one:

99.9% of the time, "value does not fall within expected range" means you have circular references, or references to two different versions of the same assembly.

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



来源:https://stackoverflow.com/questions/12727771/clickonce-value-does-not-fall-within-the-expected-range

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!