locked
ClicOnce installation failed RRS feed

  • Question

  • I've created a custom click once for my project.
    but the installation always failed..

    please help me to understand the reason..

    my script code (works perfectly for my different application):

        @echo on
        
        SET version="2.2.2.25"
        
        SET PROJECT_HOME_OUTPUT="C:\MYAPPLICATIONClickOnes"
        SET PROJECT_HOME_TOOLS="D:\MYAPPLICATIONClickOnes\MYAPPLICATIONClickOnes"
        
        
        
        rem **************************** DEV ***************************************************************************
        SET ConfigFileRep="D:\MYAPPLICATIONClickOnes\MYCLIENT"
        SET RELEASE_FOLDER="D:\MYAPPLICATIONClickOnes\Release"
        SET PATH=%PATH%;"C:\Program Files (x86)\MSBuild\12.0\Bin"
        SET msbuild="C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild.exe"
        rem **************************** DEV ***************************************************************************
        
        
        :MYCLIENT
        SET cust=MYCLIENT
        SET clickURL=http://MYSITE
        
        if "%FEATURE%"=="true" (
          SET clickURL=http://MYSITE/files/dev
        )
        
        
        :createclickonce
        
        @echo start create clickonce for %CUST% 
        del /s %PROJECT_HOME_TOOLS%\progress.log
        rem pause
        
        
        @echo ========================Create clickonce for: %CUST%================================ 
        C:\WINDOWS\system32\xcopy  /S /Y /R  "%RELEASE_FOLDER%\*"  "%PROJECT_HOME_OUTPUT%\ClickOnce\%CUST%\MYAPPLICATION_%version%\"  >> %PROJECT_HOME_TOOLS%\progress.log
        C:\WINDOWS\system32\xcopy  /S /Y /R  "%ConfigFileRep%\*"   "%PROJECT_HOME_OUTPUT%\ClickOnce\%CUST%\MYAPPLICATION_%version%\"  >> %PROJECT_HOME_TOOLS%\progress.log
        rem pause
        
        @echo cd to the output folder
        cd /D "%PROJECT_HOME_OUTPUT%\ClickOnce\%CUST%\MYAPPLICATION_%version%\" 
        
        @echo delete pdb files 
        for /r "%PROJECT_HOME_OUTPUT%\ClickOnce\%CUST%\MYAPPLICATION_%version%\" %%x in (*.pdb) do del /s "%%x"      >> %PROJECT_HOME_TOOLS%\progress.log
        
        
        rem pause
        @echo signing exe file manifest.... 
        %msbuild% %PROJECT_HOME_TOOLS%\sign.csproj /p:SigningTarget=%PROJECT_HOME_OUTPUT%\ClickOnce\%CUST%\MYAPPLICATION_%version%\MYAPPLICATION.exe
        rem pause
        
        @echo create app manifest 
        %PROJECT_HOME_TOOLS%\mage.exe -New Application -Processor msil -ToFile MYAPPLICATION.exe.manifest -name "MYAPPLICATION_%CUST%" -Version %version% -IconFile  MYAPPLICATION.ico -FromDirectory .
        rem pause 
        
        @echo signing app manifest.... 
        %msbuild% %PROJECT_HOME_TOOLS%\sign.csproj /p:SigningTarget=%PROJECT_HOME_OUTPUT%\ClickOnce\%CUST%\MYAPPLICATION_%version%\MYAPPLICATION.exe.manifest
        rem pause 
        
        @echo renaming to extention .deploy 
        for /R %%F in (*) do  ren "%%F" "%%~nxF.deploy"
        
        ren MYAPPLICATION.exe.manifest.deploy MYAPPLICATION.exe.manifest
        
        @echo create deploy manifest 
        rem pause
        CD..
        %PROJECT_HOME_TOOLS%\mage.exe -New Deployment -Processor msil  -Publisher "MYAPPLICATION-%CUST%" -ProviderUrl "%clickURL%/files/RTS/ClickOnce/%CUST%/MYAPPLICATION.application" -AppManifest MYAPPLICATION_%version%\MYAPPLICATION.exe.manifest -Version %version% -MinVersion %version% -ToFile MYAPPLICATION.application
         rem pause
        
        @echo sign deploy manifest.... 
        %msbuild%   %PROJECT_HOME_TOOLS%\sign.csproj  /p:SigningTarget=%PROJECT_HOME_OUTPUT%\ClickOnce\%CUST%\MYAPPLICATION.application
         rem pause
        
         
        C:\WINDOWS\system32\xcopy /Y   %PROJECT_HOME_OUTPUT%\ClickOnce\%CUST%\MYAPPLICATION.application  %PROJECT_HOME_OUTPUT%\ClickOnce\%CUST%\MYAPPLICATION_%version%\ >> %PROJECT_HOME_TOOLS%\progress.log
         rem pause 
        
        
        
        @echo finish create clickonce for %CUST% 
        
        :eof


    the log error:

        PLATFORM VERSION INFO
        Windows : 10.0.14393.0 (Win32NT)
        Common Language Runtime : 4.0.30319.42000
        System.Deployment.dll : 4.7.3062.0 built by: NET472REL1
        clr.dll : 4.7.3062.0 built by: NET472REL1
        dfdll.dll : 4.7.3062.0 built by: NET472REL1
        dfshim.dll : 10.0.14393.0 (rs1_release.160715-1616)
        
        SOURCES
        Deployment url : file://fileserver/CICD/Internet/MYPROJECT/ClickOnce/MYCLIENT/MYAPPLICATION.application
        Deployment Provider url : http://MYSITE/files/MYPROJECT/ClickOnce/MYCLIENT/MYAPPLICATION.application
        Server : Microsoft-IIS/8.5
        X-Powered-By : ASP.NET
        
        IDENTITIES
        Deployment Identity : MYAPPLICATION.app, Version=2.2.2.25, Culture=neutral, PublicKeyToken=956e296b765183bf, 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 \\fileserver\CICD\Internet\MYPROJECT\ClickOnce\MYCLIENT\MYAPPLICATION.application resulted in exception. Following failure messages were detected:
        + Exception reading manifest from http://MYSITE/files/MYPROJECT/ClickOnce/MYCLIENT/MYAPPLICATION_2.2.2.25/MYAPPLICATION.exe.manifest: the manifest may not be valid or the file could not be opened.
        + Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed: 
        -HRESULT: 0x80070c81
        Start line: 0
        Start column: 0
        Host file:
        + Exception from HRESULT: 0x80070C81
        
        COMPONENT STORE TRANSACTION FAILURE SUMMARY
        No transaction error was detected.
        
        WARNINGS
        There were no warnings during this operation.
        
        OPERATION PROGRESS STATUS
        * [06/08/2020 12:43:59] : Activation of \\fileserver\CICD\Internet\MYPROJECT\ClickOnce\MYCLIENT\MYAPPLICATION.application has started.
        * [06/08/2020 12:43:59] : Processing of deployment manifest has successfully completed.
        * [06/08/2020 12:43:59] : Installation of the application has started.
        
        ERROR DETAILS
        Following errors were detected during this operation.
        * [06/08/2020 12:43:59] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
        - Exception reading manifest from http://MYSITE/files/MYPROJECT/ClickOnce/MYCLIENT/MYAPPLICATION_2.2.2.25/MYAPPLICATION.exe.manifest: the manifest may not be valid or the file could not be opened.
        - Source: System.Deployment
        - Stack trace:
        at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
        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.Deployment.Application.InvalidDeploymentException (ManifestParse)
        - Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed: 
        -HRESULT: 0x80070c81
        Start line: 0
        Start column: 0
        Host file:
        - Source: System.Deployment
        - Stack trace:
        at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)
        at System.Deployment.Application.Manifest.AssemblyManifest..ctor(FileStream fileStream)
        at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
        --- Inner Exception ---
        System.Runtime.InteropServices.COMException
        - Exception from HRESULT: 0x80070C81
        - Source: System.Deployment
        - Stack trace:
        at System.Deployment.Internal.Isolation.IsolationInterop.CreateCMSFromXml(Byte[] buffer, UInt32 bufferSize, IManifestParseErrorCallback Callback, Guid& riid)
        at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)
        
        COMPONENT STORE TRANSACTION DETAILS
        No transaction information is available.
        
        DETAILED EXECUTION FLOW
        [12:43:59] : Activation through dfsvc.exe started.
        [12:43:59] : Method Call : ActivateDeploymentWorker(\\fileserver\CICD\Internet\MYPROJECT\ClickOnce\MYCLIENT\MYAPPLICATION.application,False,,,) called.
        [12:43:59] : Method Call : PerformDeploymentActivation called.
        [12:43:59] : Activating through deployment manifest.
        [12:43:59] : Start processing deployment manifest.
        [12:43:59] : Method Call : DownloadDeploymentManifestBypass called.
        [12:43:59] : Method Call : DownloadDeploymentManifestDirectBypass called.
        [12:43:59] : Method Call : DownloadManifestAsRawFile called.
        [12:43:59] : Method Call : DownloadSingleFile called
        [12:43:59] : DownloadQueueItem :  _sourceUri = file://fileserver/CICD/Internet/MYPROJECT/ClickOnce/MYCLIENT/MYAPPLICATION.application,  _targetPath = C:\Users\MYUSER\AppData\Local\Temp\Deployment\N257CQ2C.P97\YL1AHPXV.AGE.application
        [12:43:59] : HttpWebResponse=ResponseUri=file://fileserver/CICD/Internet/MYPROJECT/ClickOnce/MYCLIENT/MYAPPLICATION.application
        [12:43:59] : Method Call : ManifestReader.FromDocumentNoValidation(C:\Users\MYUSER\AppData\Local\Temp\Deployment\N257CQ2C.P97\YL1AHPXV.AGE.application) called.
        [12:43:59] : expectedAppId=file://fileserver/CICD/Internet/MYPROJECT/ClickOnce/MYCLIENT/MYAPPLICATION.application#MYAPPLICATION.app, Version=2.2.2.25, Culture=neutral, PublicKeyToken=956e296b765183bf, processorArchitecture=msil/MYAPPLICATION_MYCLIENT.exe, Version=2.2.2.25, Culture=neutral, PublicKeyToken=956e296b765183bf, processorArchitecture=msil, type=win32
        [12:43:59] : Reparse the deployment manifest for validations.
        [12:43:59] : Method Call : ManifestReader.FromDocument(C:\Users\MYUSER\AppData\Local\Temp\Deployment\N257CQ2C.P97\YL1AHPXV.AGE.application) called.
        [12:43:59] : Schema validation passed.
        [12:43:59] : Manifest is parsed successfully.
        [12:43:59] : Semantic validation passed.
        [12:43:59] : Signature validation passed.
        [12:43:59] : Method Call : FollowDeploymentProviderUri called.
        [12:43:59] : Deployment manifest zone is not local machine. Zone = Intranet
        [12:43:59] : providerUri=http://MYSITE/files/MYPROJECT/ClickOnce/MYCLIENT/MYAPPLICATION.application,sourceUri=file://fileserver/CICD/Internet/MYPROJECT/ClickOnce/MYCLIENT/MYAPPLICATION.application
        [12:43:59] : Method Call : DownloadDeploymentManifestDirect(http://MYSITE/files/MYPROJECT/ClickOnce/MYCLIENT/MYAPPLICATION.application) called.
        [12:43:59] : Method Call : DownloadManifest called.
        [12:43:59] : Method Call : DownloadManifestAsRawFile called.
        [12:43:59] : Method Call : DownloadSingleFile called
        [12:43:59] : DownloadQueueItem :  _sourceUri = http://MYSITE/files/MYPROJECT/ClickOnce/MYCLIENT/MYAPPLICATION.application,  _targetPath = C:\Users\MYUSER\AppData\Local\Temp\Deployment\AK5XK5WG.E12\VKP4JNH8.B06.application
        [12:43:59] : HttpWebRequest= Proxy.IsByPassed=True, ProxyUri=http://MYSITE/files/MYPROJECT/ClickOnce/MYCLIENT/MYAPPLICATION.application
        [12:43:59] : HttpWebResponse=ResponseUri=http://MYSITE/files/MYPROJECT/ClickOnce/MYCLIENT/MYAPPLICATION.application
        [12:43:59] : Method Call : ManifestReader.FromDocument(C:\Users\MYUSER\AppData\Local\Temp\Deployment\AK5XK5WG.E12\VKP4JNH8.B06.application) called.
        [12:43:59] : Schema validation passed.
        [12:43:59] : Manifest is parsed successfully.
        [12:43:59] : Semantic validation passed.
        [12:43:59] : Signature validation passed.
        [12:43:59] : Deployment provider followed: http://MYSITE/files/MYPROJECT/ClickOnce/MYCLIENT/MYAPPLICATION.application
        [12:43:59] : Processing of deployment manifest has successfully completed.
        [12:43:59] : Could not find application in store. Continue with downloading application manifest.
        [12:43:59] : Method Call : InstallApplication called.
        [12:43:59] : Method Call : DownloadApplication called.
        [12:43:59] : Start processing application manifest.
        [12:43:59] : Method Call : DownloadApplicationManifest called.
        [12:43:59] : Method Call : DownloadManifest called.
        [12:43:59] : Method Call : DownloadManifestAsRawFile called.
        [12:43:59] : Method Call : DownloadSingleFile called
        [12:43:59] : DownloadQueueItem :  _sourceUri = http://MYSITE/files/MYPROJECT/ClickOnce/MYCLIENT/MYAPPLICATION_2.2.2.25/MYAPPLICATION.exe.manifest,  _targetPath = C:\Users\MYUSER\AppData\Local\Temp\Deployment\W7KKKGO5.JXX\6Q5RXCA3.NZJ\MYAPPLICATION_MYCLIENT.exe.manifest
        [12:43:59] : HttpWebRequest= Proxy.IsByPassed=True, ProxyUri=http://MYSITE/files/MYPROJECT/ClickOnce/MYCLIENT/MYAPPLICATION_2.2.2.25/MYAPPLICATION.exe.manifest
        [12:43:59] : HttpWebResponse=ResponseUri=http://MYSITE/files/MYPROJECT/ClickOnce/MYCLIENT/MYAPPLICATION_2.2.2.25/MYAPPLICATION.exe.manifest
        [12:43:59] : Method Call : ManifestReader.FromDocument(C:\Users\MYUSER\AppData\Local\Temp\Deployment\W7KKKGO5.JXX\6Q5RXCA3.NZJ\MYAPPLICATION_MYCLIENT.exe.manifest) called.
        [12:43:59] : Schema validation passed.

    Thursday, August 6, 2020 10:45 AM

All replies

  • Hi DavidMichaeli,
    >>the manifest may not be valid or the file could not be opened. Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed: -HRESULT:0x80070c81
    Based on your description, I have some suggestions you can refer to.
    1.This error is mostly caused by circular dependencies. Does your project have dependencies? If so, please clear all dependencies.
    2.Have you referenced third-party dlls? If so, you can move them to the folder and re-reference them.
    3.To avoid permission issues, you need to do these operations as an administrator.
    Best Regards,
    Daniel Zhang


    "Windows Forms General" forum will be migrating to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Windows Forms General" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.


    Friday, August 7, 2020 6:54 AM
  • Hi DavidMichaeli,
    How is your progress now? And is the problem solved? If it is resolved, we suggest that you mark it as the answer. So it can help other people who have the same problem find a solution quickly. 
    Best Regards,
    Daniel Zhang


    "Windows Forms General" forum will be migrating to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Windows Forms General" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.

    Wednesday, August 12, 2020 9:35 AM