ClickOnce安装错误

时间:2015-07-01 10:10:06

标签: c# .net wpf clickonce

我有正确的ClickOnce安装程序,用于在Visual Studio 2008(C#,.NET 3.5)中创建的应用程序。在Visual Studio 2013进行此项目转换后,我无法创建正确的ClickOnce安装程序。在ClickOnce应用程序启动时出现此错误。

    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
    file:///C:/Documents%20and%20Settings/<username>/Start%20Menu/Programs/<programname>/<programname>.appref-ms%7C


        Deployment url          : file://MyServer/d/My_Setup/MyApp.application
        Deployment Provider url     : file://MyServer/d/My_Setup/MyApp.application
        Application url         : ile://MyServer/d/My_Setup/Application%20Files/MyApp_1_0_0_711/MyApp.exe.manifest

    IDENTITIES
        Deployment Identity     : MyApp.application, Version=1.0.0.711, Culture=neutral, PublicKeyToken=cdfbb15e6196321d, processorArchitecture=msil
        Application Identity        : MyApp.exe, Version=1.0.0.711, Culture=neutral, PublicKeyToken=cdfbb15e6196321d, 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 \\MyServer\d\My_Setup\MyApp.application resulted in exception. Following failure messages were detected:
            + Value does not fall within the expected range.

    COMPONENT STORE TRANSACTION FAILURE SUMMARY
        No transaction error was detected.

    WARNINGS
        There were no warnings during this operation.

    OPERATION PROGRESS STATUS
        * [01/07/2015 11:34:15] : Activation of \\MyServer\d\My_Setup\MyApp.application has started.
        * [01/07/2015 11:34:15] : Processing of deployment manifest has successfully completed.
        * [01/07/2015 11:34:15] : Installation of the application has started.
        * [01/07/2015 11:34:16] : Processing of application manifest has successfully completed.
        * [01/07/2015 11:34:19] : Found compatible runtime version 2.0.50727.
        * [01/07/2015 11:34:19] : Detecting dependent assembly Sentinel.v3.5Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=msil using Sentinel.v3.5Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Detecting dependent assembly System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil using System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Detecting dependent assembly WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=msil using WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Detecting dependent assembly CrystalDecisions.ReportAppServer.XmlSerialize, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304, processorArchitecture=msil using CrystalDecisions.ReportAppServer.XmlSerialize, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Detecting dependent assembly CrystalDecisions.ReportAppServer.CommonControls, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304, processorArchitecture=msil using CrystalDecisions.ReportAppServer.CommonControls, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Detecting dependent assembly CrystalDecisions.Windows.Forms, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304, processorArchitecture=msil using CrystalDecisions.Windows.Forms, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Detecting dependent assembly CrystalDecisions.ReportAppServer.Controllers, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304, processorArchitecture=msil using CrystalDecisions.ReportAppServer.Controllers, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Detecting dependent assembly CrystalDecisions.ReportAppServer.DataSetConversion, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304, processorArchitecture=msil using CrystalDecisions.ReportAppServer.DataSetConversion, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Detecting dependent assembly CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304, processorArchitecture=msil using CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Detecting dependent assembly System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil using System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Detecting dependent assembly System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil using System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Detecting dependent assembly CrystalDecisions.ReportAppServer.CommonObjectModel, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304, processorArchitecture=msil using CrystalDecisions.ReportAppServer.CommonObjectModel, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Detecting dependent assembly CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304, processorArchitecture=msil using CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Detecting dependent assembly CrystalDecisions.ReportAppServer.DataDefModel, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304, processorArchitecture=msil using CrystalDecisions.ReportAppServer.DataDefModel, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Detecting dependent assembly CrystalDecisions.ReportAppServer.ObjectFactory, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304, processorArchitecture=msil using CrystalDecisions.ReportAppServer.ObjectFactory, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Detecting dependent assembly CrystalDecisions.ReportAppServer.ReportDefModel, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304, processorArchitecture=msil using CrystalDecisions.ReportAppServer.ReportDefModel, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Detecting dependent assembly CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304, processorArchitecture=msil using CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Detecting dependent assembly CrystalDecisions.ReportAppServer.CommLayer, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304, processorArchitecture=msil using CrystalDecisions.ReportAppServer.CommLayer, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Detecting dependent assembly CrystalDecisions.ReportAppServer.ClientDoc, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304, processorArchitecture=msil using CrystalDecisions.ReportAppServer.ClientDoc, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=msil.
        * [01/07/2015 11:34:19] : Request of trust and detection of platform is complete.
        * [01/07/2015 11:34:47] : Downloading of subscription dependencies is complete.
        * [01/07/2015 11:34:47] : Commit of the downloaded application has started.
        * [01/07/2015 11:34:53] : Installation of application has successfully completed.

    ERROR DETAILS
        Following errors were detected during this operation.
        * [01/07/2015 11:34:53] System.ArgumentException
            - Value does not fall within the expected range.
            - Source: System.Deployment
            - Stack trace:
                at System.Deployment.Application.NativeMethods.CorLaunchApplication(UInt32 hostType, String applicationFullName, Int32 manifestPathsCount, String[] manifestPaths, Int32 activationDataCount, String[] activationData, PROCESS_INFORMATION processInformation)
                at System.Deployment.Application.ComponentStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
                at System.Deployment.Application.SubscriptionStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
                at System.Deployment.Application.ApplicationActivator.Activate(DefinitionAppId appId, AssemblyManifest appManifest, String activationParameter, Boolean useActivationParameter)
                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
        * Transaction at [01/07/2015 11:34:53]
            + System.Deployment.Internal.Isolation.StoreOperationStageComponent
                - Status: Installed
                - HRESULT: 0x0
                - Manifest: DHMC5ZJ6.ABJ.application
            + System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata
                - Status: Set
                - HRESULT: 0x0
            + System.Deployment.Internal.Isolation.StoreOperationStageComponent
                - Status: Installed
                - HRESULT: 0x0
                - Manifest: MyApp.exe.manifest
            + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
                - Status: Installed
                - HRESULT: 0x0
                - File: Purchase\Reports\rpt_PurchaseOrderFooterLat.rpt
            + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
                - Status: Installed
                - HRESULT: 0x0
                - File: Resourses\Printer.png
            + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile
                - Status: Installed
                - HRESULT: 0x0
                - File: Resourses\stock_mail-receive1.png 

.............

2 个答案:

答案 0 :(得分:2)

根据我的经验,这与你的实际清单没什么关系。这意味着ClickOnce缓存目录以某种方式被破坏。

尝试删除以下文件夹(注意:确保其他应用程序中没有任何内容!):

  • %LOCALAPPDATA%\Apps\2.0内部除Data(应用程序缓存)
  • 之外的任何文件夹
  • %LOCALAPPDATA%\assembly(下载缓存)

然后尝试安装/更新应用程序。它会正常工作。

答案 1 :(得分:0)

创建扩展名为.bat的新文件。 将其复制到文件中。

// read file into array (could use file_get_contents instead) $data = file('myfile.txt'); // split the first line into two parts, store them into $people and $score variables list($people, $score) = explode(' ', $data[0], 2); // Looks like score is out of 10 so * 10 to get convert to % $score_as_percentage = $score*10; // Output HTML, profit! echo '<div class="amount" style="height: '.$score_as_percentage.';"></div>';

运行文件。