0

我正在使用 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 个字符,但是我应该在哪里寻找这些路径,唯一的长路径可能在引用或其他东西中,但我认为这应该不是问题。

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

4

1 回答 1

0

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

如果您想获得有关在安装部署时发生的情况的更多信息,您可以打开增强日志记录。

于 2012-08-25T07:25:45.767 回答