ClickOnce安装提供错误“无效的相对文件路径”

时间:2012-08-09 10:24:45

标签: c# .net visual-studio-2010 deployment clickonce

我正在使用Visual Studio 2010,.NET4

我的应用程序是使用ClickOnce发布的,它会成功发布到服务器或本地磁盘,但是当尝试从MyApp.application安装时,它会出错:

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of \\*.*.*.com\**\**\MyApp.application resulted in exception. Following failure messages were detected:
    + Invalid relative file path.

ERROR DETAILS
Following errors were detected during this operation.
* [09/08/2012 10:53:59] System.ArgumentException
    - Invalid relative file path.
    - Source: System.Deployment
    - Stack trace:
        at System.Deployment.Application.UriHelper.UriFromRelativeFilePath(Uri baseUri, String path)
        at System.Deployment.Application.DownloadManager.MapFileSourceUri(AssemblyManifest deployManifest, Uri sourceUriBase, String fileName)
        at System.Deployment.Application.DownloadManager.ProcessDownloadedFile(Object sender, DownloadEventArgs e)
        at System.Deployment.Application.FileDownloader.DownloadModifiedEventHandler.Invoke(Object sender, DownloadEventArgs e)
        at System.Deployment.Application.FileDownloader.OnModified()
        at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
        at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
        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)

有没有办法查看哪条路径出错?为什么? MSDN中提到的唯一路径是它们长度不能超过100个字符,但我应该在哪里寻找这些路径,唯一的长路径可能在引用或其他东西,但我不认为这应该是一个问题。

最后我在前一段时间更改了解决方案名称,并且涉及在某些文件中手动更改它,是否可能旧的名称仍然存在,即使搜索在整个解决方案中的任何文件中找不到它?

1 个答案:

答案 0 :(得分:0)

星号是你的还是它们实际上在日志中?看起来部署URL有些奇怪。您应该将发布文件位置设置为指向文件所在的位置。安装URL应指向部署所在的文件夹。

如果您希望获得有关部署安装过程中发生的情况的更多信息,则可以turn on enhanced logging

相关问题