本文介绍了ClickOnce部署错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试部署ClickOnce应用。以前,服务器只是安装了.Net 2.0(没有SP)。最近服务器上安装了3.5SP1,现在ClickOnce失败,出现错误:



值不在预期范围内 strong> System.Deployment 。



以下是MSDN论坛上发布的信息(对于我来说,答案一般都是对我而言)与调用堆栈:



在VS 2005 w / SP1中,我尝试更改我发布的路径,更改安装URL,更改程序集名称,手动控制版本,运行法师 - cc,手动删除%userprofile%\AppData\Local\Apps中的所有应用程序数据,甚至完全更改部署服务器,但仍然会收到相同的错误:



错误详细信息
在此操作期间检测到以下错误。
* [3/30/2009 5:35:37 PM] System.ArgumentException
- 值不在预期范围内。
- 来源:System.Deployment
- 堆栈跟踪:
在System.Deployment.Internal.Isolation.IStore.LockApplicationPath(UInt32 Flags,IDefinitionAppId ApId,IntPtr& Cookie)
at System.Deployment.Application.ComponentStore.LockApplicationPath(DefinitionAppId definitionAppId)
在System.Deployment.Application.SubscriptionStore.LockApplicationPath(DefinitionAppId definitionAppId)
在System.Deployment.Application.FileDownloader.PatchFiles(SubscriptionState subState)$ System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)中的
System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState,AssemblyManifest deployManifest,AssemblyManifest appManifest,Uri sourceUriBase,String targetDirectory,String group, IDownloadNotification通知,DownloadOptions选项)
在System.Deployment.Application .ApplicationActivator.DownloadApplication(SubscriptionState subState,ActivationDescription actDesc,Int64 transactionId,TempDirectory&在System.Deployment.ApplicationActivator.PerformDeploymentActivation(Uri activationUri,Boolean isShortcut,String textualSubId,String deploymentProviderUrlFromExtension)中的
在System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState,ActivationDescription actDesc)
,BrowserSettings browserSettings,String& errorPageUrl)
在System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(对象状态)



任何帮助将是非常感谢。 。



引用的论坛是

解决方案

结束我解决问题的唯一方法是创建一个全新的项目,并从每个表单复制代码,然后发布在。



Jonez:不幸的是,移动我的用户个人资料将是一个重大麻烦,在我看来,这将是解决发布问题的主要过失。 >

Gregory:安装将失败,出现该错误。我尝试发布到一个新的位置(不同的物理服务器),问题仍然存在,我确认没有任何一个符号被使用。


I am trying to deploy a ClickOnce app. It had worked previously when the server was just sitting with .Net 2.0 installed (no SP). Recently the server had 3.5SP1 installed on it and now ClickOnce is failing with the error:

Value does not fall within the expected range inside System.Deployment.

Here is the information posted on the MSDN forums (answers there are generally hit or miss for me) with the call stack:

It was in VS 2005 w/SP1 and I tried changing the path I publish to, changing the installation URL, changing the assembly name, manually controlling versions, running mage -cc, manually removing all application data in %userprofile%\AppData\Local\Apps and even changing deployment servers completely but still get the same error:

ERROR DETAILS Following errors were detected during this operation. * [3/30/2009 5:35:37 PM] System.ArgumentException - Value does not fall within the expected range. - Source: System.Deployment - Stack trace: at System.Deployment.Internal.Isolation.IStore.LockApplicationPath(UInt32 Flags, IDefinitionAppId ApId, IntPtr& Cookie) at System.Deployment.Application.ComponentStore.LockApplicationPath(DefinitionAppId definitionAppId) at System.Deployment.Application.SubscriptionStore.LockApplicationPath(DefinitionAppId definitionAppId) at System.Deployment.Application.FileDownloader.PatchFiles(SubscriptionState subState) at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState) at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options) at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp) at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc) 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)

Any help at all would be much appreciated..

The referenced forum is here

解决方案

In the end my only way of resolving the issue was to create an entirely new project and copy the code over from each form and then publish that.

Jonez: Unfortunately moving my user profile would have been a major hassle and it seemed to me that this would've been major overkill to fix a publishing issue.

Gregory: The installation would fail with that error. I tried publishing to a new location (different physical server) and the issue was still present and I confirmed no ampersands were used in either path.

这篇关于ClickOnce部署错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-27 23:40