【发布时间】:2011-10-15 16:21:27
【问题描述】:
我们的一位用户在使用 ClickOnce 时遇到了非常严重的问题。这个错误很经典:
Following errors were detected during this operation. * [14/10/2011 01:40:25] System.IO.FileNotFoundException
- The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
- Source: System.Deployment
- Stack trace:
at System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore(UInt32 Flags, IntPtr hToken, Guid& riid)
at System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore()
at System.Deployment.Application.ComponentStore..ctor(ComponentStoreType storeType, SubscriptionStore subStore)
at System.Deployment.Application.SubscriptionStore..ctor(String deployPath, String tempPath, ComponentStoreType storeType)
at System.Deployment.Application.SubscriptionStore.get_CurrentUser()
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)
但是传统的解决方案都不起作用。我们试过了:
- 删除清单中与应用程序相关的文件夹和文件
- 删除 2.0 文件夹
- 删除应用文件夹
- 运行法师-cc
- 杀死 dfsvc.exe 并重试(每次失败时都会加载 dfsvc)
我在 .NET 3.5 和 .NET 4.0 中发布了一个 helloworld 应用程序,并将整个 \publish 文件夹复制到他的机器上。这也没有安装,给出了同样的错误。最后,我去注册表尝试为每个 RobinDotNet 添加增强的日志记录,并意识到 HKCU\Software\Classes\Software 完全丢失了。在更多线程之后,我将其重命名为 UsrClass.dat。但是,注销并登录后,并没有重建。我怀疑这可能是问题所在。关于如何让 ClickOnce 再次工作有什么想法吗?
这是一个相当新的 Windows 7 专业版安装。
更新这是另一个线索。我们可以将 UsrClass.dat 重命名为任何内容或将其删除,而不会受到 Windows 的任何投诉 - 因此它不会被加载。在我的机器上,它抱怨它正在使用中。
【问题讨论】:
-
当您说您在 .NET 3.5 和 .NET 4.0 中发布了应用程序并将 \publish 文件夹复制到他的机器上时,您是什么意思?您的应用程序的安装 URL 是什么?因为如果将其设置为从其他地方安装它,则将其复制到机器将不起作用——它会在该位置查找。