如何处理clickonce安装错误

时间:2015-08-27 18:31:58

标签: c# wpf visual-studio-2013

我已经制作了一个c#应用程序,并在发布后遇到以下安装错误。

PLATFORM VERSION INFO
    Windows             : 6.2.9200.0 (Win32NT)
    Common Language Runtime     : 4.0.30319.34014
    System.Deployment.dll       : 4.0.30319.34243 built by: FX452RTMGDR
    clr.dll             : 4.0.30319.34014 built by: FX45W81RTMGDR
    dfdll.dll           : 4.0.30319.34243 built by: FX452RTMGDR
    dfshim.dll          : 6.3.9600.16384 (winblue_rtm.130821-1623)

SOURCES
    Deployment url          : file:///C:/Users/username/New%20folder/HomeProg/WORK/MyApp2/Setup/MyApp/MyApp/publish/MyApp.application
    Application url         : file:///C:/Users/username/New%20folder/HomeProg/WORK/MyApp2/Setup/MyApp/MyApp/publish/Application%20Files/MyApp_1_0_0_5/MyApp.exe.manifest

IDENTITIES
    Deployment Identity     : MyApp.application, Version=1.0.0.5, Culture=neutral, PublicKeyToken=929f04053a5afc91, processorArchitecture=msil
    Application Identity        : MyApp.exe, Version=1.0.0.5, Culture=neutral, PublicKeyToken=929f04053a5afc91, processorArchitecture=msil, type=win32

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:\Users\username\New folder\MyApp\MyApp\publish\MyApp.application resulted in exception. Following failure messages were detected:
        + Reference in the manifest does not match the identity of the downloaded assembly MyApp.exe.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

WARNINGS
    There were no warnings during this operation.

OPERATION PROGRESS STATUS
    * [24/08/2015 11:29:37 PM] : Activation of C:\Users\username\New folder\HomeProg\WORK\MyApp2\Setup\MyApp\MyApp\publish\MyApp.application has started.
    * [24/08/2015 11:29:37 PM] : Processing of deployment manifest has successfully completed.
    * [24/08/2015 11:29:37 PM] : Installation of the application has started.
    * [24/08/2015 11:29:37 PM] : Processing of application manifest has successfully completed.
    * [24/08/2015 11:29:40 PM] : Found compatible runtime version 4.0.30319.
    * [24/08/2015 11:29:40 PM] : Request of trust and detection of platform is complete.

ERROR DETAILS
    Following errors were detected during this operation.
    * [24/08/2015 11:29:41 PM] System.Deployment.Application.InvalidDeploymentException (RefDefValidation)
        - Reference in the manifest does not match the identity of the downloaded assembly MyApp.exe.
        - Source: System.Deployment
        - Stack trace:
            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.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)

COMPONENT STORE TRANSACTION DETAILS
    No transaction information is available.

已在整个互联网上搜索解决方案,我发现的解决方案很复杂,与我的问题无关。

该应用程序是在Visual Studio 2013中制作的.Net 4.5 wpf应用程序。非常感谢任何形式的帮助和/或有用资源的链接

1 个答案:

答案 0 :(得分:0)

您需要将项目设置更改为QGroupBox

请参阅:https://stackoverflow.com/a/5339135/1776231

  

项目属性 - > 应用程序标签 - > 资源 - >复选框图标和清单,设置“使用默认设置嵌入清单”   引起了这个问题。将其设置为“无需创建应用程序   清单“修复了问题。