ClickOnce 部署错误 [英] ClickOnce Deployment Errors

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

问题描述

我正在尝试部署 ClickOnce 应用程序.当服务器刚刚安装了 .Net 2.0(没有 SP)时,它以前工作过.最近服务器上安装了 3.5SP1,现在 ClickOnce 失败并显示错误:

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:

值不在System.Deployment内的预期范围.

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

以下是 MSDN 论坛上发布的有关调用堆栈的信息(对我来说通常是命中或未命中的答案):

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

它在 VS 2005 w/SP1 中,我尝试更改发布到的路径、更改安装 URL、更改程序集名称、手动控制版本、运行 mage -cc、手动删除 %userprofile% 中的所有应用程序数据AppDataLocalApps 甚至完全改变部署服务器但仍然得到同样的错误:

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%AppDataLocalApps and even changing deployment servers completely but still get the same error:

错误详情在此操作期间检测到以下错误.* [3/30/2009 5:35:37 PM] System.ArgumentException- 值不在预期范围内.- 来源:System.Deployment- 堆栈跟踪:在 System.Deployment.Internal.Isolation.IStore.LockApplicationPath(UInt32 Flags, IDefinitionAppId ApId, IntPtr& Cookie)在 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& downloadTemp)在 System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)在 System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)在 System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(对象状态)

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..

引用的论坛是 这里

推荐答案

最后,我解决这个问题的唯一方法是创建一个全新的项目,并从每个表单复制代码,然后将其发布.

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:不幸的是,移动我的用户资料会带来很大的麻烦,而且在我看来,这对于解决发布问题来说太过分了.

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:安装将因该错误而失败.我尝试发布到新位置(不同的物理服务器),但问题仍然存在,我确认在任一路径中都没有使用与符号.

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 部署错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆