ClickOnce:无法下载应用程序
ClickOnce : cannot download application
我正在创建一个 clickonce POC。我们喜欢使用部署 api 来更新,因此应用程序不应以 'normal' 方式自行更新。
场景 1:
选中 'application should check for updates' 复选框。
发布
并尝试安装应用程序
结果:一切正常
场景 2:
取消选中 'application should check for updates'
发布
尝试安装
错误
详情:
PLATFORM VERSION INFO Windows : 10.0.16299.0 (Win32NT) Common
Language Runtime : 4.0.30319.42000 System.Deployment.dll :
4.7.2556.0 built by: NET471REL1 clr.dll : 4.7.2650.0 built by: NET471REL1LAST_B dfdll.dll : 4.7.2556.0 built by: NET471REL1
dfshim.dll : 10.0.16299.15 (WinBuild.160101.0800)
SOURCES Deployment url :
file:///C:/temp/ClickoncePOC.WPF%20(15).application
IDENTITIES Deployment Identity : ClickoncePOC.WPF.application,
Version=1.0.1.7, Culture=neutral, PublicKeyToken=664aa18d594fb70e,
processorArchitecture=msil
APPLICATION SUMMARY * Installable application.
ERROR SUMMARY Below is a summary of the errors, details of these
errors are listed later in the log. * Activation of
C:\temp\ClickoncePOC.WPF (15).application resulted in exception.
Following failure messages were detected: + Downloading
file:///C:/temp/Application
Files/ClickoncePOC.WPF_1_0_1_7/ClickoncePOC.WPF.exe.manifest did not
succeed. + Could not find a part of the path 'C:\temp\Application
Files\ClickoncePOC.WPF_1_0_1_7\ClickoncePOC.WPF.exe.manifest'. +
Could not find a part of the path 'C:\temp\Application
Files\ClickoncePOC.WPF_1_0_1_7\ClickoncePOC.WPF.exe.manifest'. +
Could not find a part of the path 'C:\temp\Application
Files\ClickoncePOC.WPF_1_0_1_7\ClickoncePOC.WPF.exe.manifest'.
COMPONENT STORE TRANSACTION FAILURE SUMMARY No transaction error was
detected.
WARNINGS There were no warnings during this operation.
OPERATION PROGRESS STATUS * [28/05/2018 11:41:56] : Activation of
C:\temp\ClickoncePOC.WPF (15).application has started. * [28/05/2018
11:41:56] : Processing of deployment manifest has successfully
completed. * [28/05/2018 11:41:56] : Installation of the application
has started.
ERROR DETAILS Following errors were detected during this operation.
* [28/05/2018 11:41:56]
System.Deployment.Application.DeploymentDownloadException (Unknown
subtype)
- Downloading file:///C:/temp/Application Files/ClickoncePOC.WPF_1_0_1_7/ClickoncePOC.WPF.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, X509Certificate2 clientCertificate) 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.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, Uri& deploymentUri) at
System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri
activationUri, Boolean isShortcut, String textualSubId, String
deploymentProviderUrlFromExtension, BrowserSettings browserSettings,
String& errorPageUrl)
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(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:\temp\Application Files\ClickoncePOC.WPF_1_0_1_7\ClickoncePOC.WPF.exe.manifest'.
- Source: System
- Stack trace: at System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)
at
System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem
next) --- Inner Exception --- System.Net.WebException
- Could not find a part of the path 'C:\temp\Application Files\ClickoncePOC.WPF_1_0_1_7\ClickoncePOC.WPF.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:\temp\Application Files\ClickoncePOC.WPF_1_0_1_7\ClickoncePOC.WPF.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.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.
有什么建议吗?
我找到了解决方法。
部署应用并选中更新。
使用 mageui.exe 更新部署清单。在 mageui 中取消选中更新,保存并签署清单,您就有了清单的工作版本。
我正在创建一个 clickonce POC。我们喜欢使用部署 api 来更新,因此应用程序不应以 'normal' 方式自行更新。
场景 1: 选中 'application should check for updates' 复选框。
发布 并尝试安装应用程序
结果:一切正常
场景 2: 取消选中 'application should check for updates' 发布 尝试安装
错误
详情:
PLATFORM VERSION INFO Windows : 10.0.16299.0 (Win32NT) Common Language Runtime : 4.0.30319.42000 System.Deployment.dll : 4.7.2556.0 built by: NET471REL1 clr.dll : 4.7.2650.0 built by: NET471REL1LAST_B dfdll.dll : 4.7.2556.0 built by: NET471REL1 dfshim.dll : 10.0.16299.15 (WinBuild.160101.0800)
SOURCES Deployment url : file:///C:/temp/ClickoncePOC.WPF%20(15).application
IDENTITIES Deployment Identity : ClickoncePOC.WPF.application, Version=1.0.1.7, Culture=neutral, PublicKeyToken=664aa18d594fb70e, processorArchitecture=msil
APPLICATION SUMMARY * Installable application.
ERROR SUMMARY Below is a summary of the errors, details of these errors are listed later in the log. * Activation of C:\temp\ClickoncePOC.WPF (15).application resulted in exception. Following failure messages were detected: + Downloading file:///C:/temp/Application Files/ClickoncePOC.WPF_1_0_1_7/ClickoncePOC.WPF.exe.manifest did not succeed. + Could not find a part of the path 'C:\temp\Application Files\ClickoncePOC.WPF_1_0_1_7\ClickoncePOC.WPF.exe.manifest'. + Could not find a part of the path 'C:\temp\Application Files\ClickoncePOC.WPF_1_0_1_7\ClickoncePOC.WPF.exe.manifest'. + Could not find a part of the path 'C:\temp\Application Files\ClickoncePOC.WPF_1_0_1_7\ClickoncePOC.WPF.exe.manifest'.
COMPONENT STORE TRANSACTION FAILURE SUMMARY No transaction error was detected.
WARNINGS There were no warnings during this operation.
OPERATION PROGRESS STATUS * [28/05/2018 11:41:56] : Activation of C:\temp\ClickoncePOC.WPF (15).application has started. * [28/05/2018 11:41:56] : Processing of deployment manifest has successfully completed. * [28/05/2018 11:41:56] : Installation of the application has started.
ERROR DETAILS Following errors were detected during this operation. * [28/05/2018 11:41:56] System.Deployment.Application.DeploymentDownloadException (Unknown subtype) - Downloading file:///C:/temp/Application Files/ClickoncePOC.WPF_1_0_1_7/ClickoncePOC.WPF.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, X509Certificate2 clientCertificate) 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.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, Uri& deploymentUri) at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(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:\temp\Application Files\ClickoncePOC.WPF_1_0_1_7\ClickoncePOC.WPF.exe.manifest'. - Source: System - Stack trace: at System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next) --- Inner Exception --- System.Net.WebException - Could not find a part of the path 'C:\temp\Application Files\ClickoncePOC.WPF_1_0_1_7\ClickoncePOC.WPF.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:\temp\Application Files\ClickoncePOC.WPF_1_0_1_7\ClickoncePOC.WPF.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.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.
有什么建议吗?
我找到了解决方法。
部署应用并选中更新。 使用 mageui.exe 更新部署清单。在 mageui 中取消选中更新,保存并签署清单,您就有了清单的工作版本。