visual-studio-2010 - ClickOnce 安装文件夹总是 C :\Downloads?

标签 visual-studio-2010 clickonce

我正在尝试将应用程序部署到文件服务器并生成一个 html 文件,以便用户可以从此页面下载我的应用程序。但是,出于某种原因,从该页面下载文件时,安装文件夹似乎变得异常。下载链接到正确的文件(存在)但是当 clickonce list 运行时它找不到应用程序文件,因为它在我的本地下载文件夹中查找。我觉得这是我的一个愚蠢的疏忽,但我无法弄清楚。有什么建议吗?

    PLATFORM VERSION INFO
    Windows             : 6.1.7601.65536 (Win32NT)
    Common Language Runtime     : 4.0.30319.18408
    System.Deployment.dll       : 4.0.30319.18408 built by: FX451RTMGREL
    clr.dll             : 4.0.30319.18408 built by: FX451RTMGREL
    dfdll.dll           : 4.0.30319.18408 built by: FX451RTMGREL
    dfshim.dll          : 4.0.41209.0 (Main.041209-0000)

SOURCES
    Deployment url          : file:///C:/Users/USERNAME/Downloads/DeploymentTest.application

IDENTITIES
    Deployment Identity     : DeploymentTest.application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e1db13b08bdedb27, processorArchitecture=x86

APPLICATION SUMMARY
    * Online only application.

ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of C:\Users\Z50BXH\Downloads\DeploymentTest.application resulted in exception. Following failure messages were detected:
        + Downloading file:///C:/Users/Z50BXH/Downloads/Application Files/DeploymentTest_1_0_0_0/DeploymentTest.exe.manifest did not succeed.
        + Could not find a part of the path 'C:\Users\USERNAME\Downloads\Application Files\DeploymentTest_1_0_0_0\DeploymentTest.exe.manifest'.
        + Could not find a part of the path 'C:\Users\USERNAME\Downloads\Application Files\DeploymentTest_1_0_0_0\DeploymentTest.exe.manifest'.
        + Could not find a part of the path 'C:\Users\USERNAME\Downloads\Application Files\DeploymentTest_1_0_0_0\DeploymentTest.exe.manifest'.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

WARNINGS
    There were no warnings during this operation.

OPERATION PROGRESS STATUS
    * [7/7/2014 1:08:50 PM] : Activation of C:\Users\Z50BXH\Downloads\DeploymentTest.application has started.
    * [7/7/2014 1:08:50 PM] : Processing of deployment manifest has successfully completed.
    * [7/7/2014 1:08:50 PM] : Installation of the application has started.

ERROR DETAILS
    Following errors were detected during this operation.
    * [7/7/2014 1:08:50 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
        - Downloading file:///C:/Users/USERNAME/Downloads/Application Files/DeploymentTest_1_0_0_0/DeploymentTest.exe.manifest did not succeed.
        - Source: System.Deployment
        - Stack trace:
            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.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
            at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
            at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, Uri& appSourceUri, String& appManifestPath)
            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)
        --- Inner Exception ---
        System.Net.WebException
        - Could not find a part of the path 'C:\Users\USERNAME\Downloads\Application Files\DeploymentTest_1_0_0_0\DeploymentTest.exe.manifest'.
        - Source: System
        - Stack trace:
            at System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)
            at System.Net.FileWebRequest.GetResponse()
            at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
        --- Inner Exception ---
        System.Net.WebException
        - Could not find a part of the path 'C:\Users\USERNAME\Downloads\Application Files\DeploymentTest_1_0_0_0\DeploymentTest.exe.manifest'.
        - Source: System
        - Stack trace:
            at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
            at System.Net.FileWebRequest.GetResponseCallback(Object state)
        --- Inner Exception ---
        System.IO.DirectoryNotFoundException
        - Could not find a part of the path 'C:\Users\USERNAME\Downloads\Application Files\DeploymentTest_1_0_0_0\DeploymentTest.exe.manifest'.
        - Source: mscorlib
        - Stack trace:
            at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
            at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
            at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
            at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
            at System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async)
            at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)

COMPONENT STORE TRANSACTION DETAILS
    No transaction information is available.

我看过这个引用 Error deploying ClickOnce application - Reference in the manifest does not match the identity of the downloaded assembly但它没有解决我的问题。

最佳答案

正如 pSattele 提到的那样,有效的答案是链接必须通过 IE。奇怪的是,虽然 SSRS Report Builder 在 ClickOnce chrome 扩展中工作,但我的应用程序却没有。无论哪种方式,它现在“有效”。谢谢大家!

关于visual-studio-2010 - ClickOnce 安装文件夹总是 C :\Downloads?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24616089/

相关文章:

c# - Visual Studio 2010 在非 SL 项目中添加 SL 项目引用导致出现警告图标

c++ - ntdll.dll 中不需要的断点!_LdrpSnapThunk@36() + 0xf5 字节

.NET ClickOnce 和 Vista 启动

.net - 使用 ClickOnce 发布时,为什么 .NET Framework 4 需要 Windows Installer 4.5

C# - ClickOnce Web 部署问题,显示 XML 代码而不是启动

asp.net - Visual Studio 2010 调试缓慢

visual-studio-2010 - 使用 Visual Studio 2010 Beta 和 CMake 从源代码构建 OpenCV 2.0 库

visual-studio - 在 Visual Studio 中构建完成后自动发布 ClickOnce

msbuild - 使用 MSBuild 发布 ClickOnce 应用程序

asp.net - SqlCommand占位符参数: "Incorrect syntax near ' ?'" and "Must declare the scalar variable @param"?