locked
Cannot setup a SCSF application by ClickOnce RRS feed

  • Question

  • hi all,

    I had a SCSF application as you know that some modules need to load dynamically at runtime, so they were not included into when publishing in VS2008.
    I found some articles that present some ways how to add the modules(dll) to application and deployment manifest. link for ex here: http://rajsharma109.squarespace.com/rajs-net-blog/2006/10/12/deploying-a-cabscsf-application-with-clickonce.html
    I followed up this link but when i run setup.exe, i got a error like this:

    Cannot download the application. The application is missing required files. Contact application vendor for assistance.

    and log's detail here:
    PLATFORM VERSION INFO
     Windows    : 6.0.6000.0 (Win32NT)
     Common Language Runtime  : 2.0.50727.3074
     System.Deployment.dll   : 2.0.50727.3053 (netfxsp.050727-3000)
     mscorwks.dll    : 2.0.50727.3074 (QFE.050727-3000)
     dfdll.dll    : 2.0.50727.3053 (netfxsp.050727-3000)
     dfshim.dll    : 2.0.50727.3053 (netfxsp.050727-3000)

    SOURCES
     Deployment url   : file:///D:/01-Projects/8-ClickOnce/New/Published/WindowsFormsApplication1.application

    IDENTITIES
     Deployment Identity  : WindowsFormsApplication1.application, Version=1.0.0.1, Culture=neutral, PublicKeyToken=25681d463c445980, 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 D:\01-Projects\8-ClickOnce\New\Published\WindowsFormsApplication1.application resulted in exception. Following failure messages were detected:
      + Downloading file:///D:/01-Projects/8-ClickOnce/New/Published/Application%20Files/WindowsFormsApplication1_1_0_0_1/WindowsFormsApplication1.exe.manifest did not succeed.
      + Could not find a part of the path 'D:\01-Projects\8-ClickOnce\New\Published\Application%20Files\WindowsFormsApplication1_1_0_0_1\WindowsFormsApplication1.exe.manifest'.
      + Could not find a part of the path 'D:\01-Projects\8-ClickOnce\New\Published\Application%20Files\WindowsFormsApplication1_1_0_0_1\WindowsFormsApplication1.exe.manifest'.
      + Could not find a part of the path 'D:\01-Projects\8-ClickOnce\New\Published\Application%20Files\WindowsFormsApplication1_1_0_0_1\WindowsFormsApplication1.exe.manifest'.

    COMPONENT STORE TRANSACTION FAILURE SUMMARY
     No transaction error was detected.

    WARNINGS
     There were no warnings during this operation.

    OPERATION PROGRESS STATUS
     * [5/30/2009 8:40:29 PM] : Activation of D:\01-Projects\8-ClickOnce\New\Published\WindowsFormsApplication1.application has started.
     * [5/30/2009 8:40:29 PM] : Processing of deployment manifest has successfully completed.
     * [5/30/2009 8:40:29 PM] : Installation of the application has started.

    ERROR DETAILS
     Following errors were detected during this operation.
     * [5/30/2009 8:40:29 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
      - Downloading file:///D:/01-Projects/8-ClickOnce/New/Published/Application%20Files/WindowsFormsApplication1_1_0_0_1/WindowsFormsApplication1.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.DownloadManifest(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ManifestType manifestType, 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)
       at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
      --- Inner Exception ---
      System.Net.WebException
      - Could not find a part of the path 'D:\01-Projects\8-ClickOnce\New\Published\Application%20Files\WindowsFormsApplication1_1_0_0_1\WindowsFormsApplication1.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 'D:\01-Projects\8-ClickOnce\New\Published\Application%20Files\WindowsFormsApplication1_1_0_0_1\WindowsFormsApplication1.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 'D:\01-Projects\8-ClickOnce\New\Published\Application%20Files\WindowsFormsApplication1_1_0_0_1\WindowsFormsApplication1.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)
       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.

    I found a lot of answers for this. But no any answer is able to help solve this error for me.

    Please help me if you know any solution.

    thanks.
    DX

    Wednesday, May 27, 2009 2:37 AM

Answers

  • Hi RobinDot Net,

           I am also facing the same problem as above. When i simply Publish the files it works. But after publish if  i add the data file using mageui.exe this problem occures.
     
    I have tested two cases.

     If update path is http is not having the deployment files. And files are present at http location and Network conection is not present.
     Because if the Setup not acccess the Local folder it will automaticaly searches for http or update fodler.

     Problems occures only for Local folder location and i want to install and update the the program through local drive CD.

    So i rename the Apllication File folder with Apllication_File and rebuilded the manifest files using MageUi.Exe and problem is solved.

    (The Problem is of only Space and charchter %20)
        
    • Proposed as answer by Prashant_p2b Wednesday, October 21, 2009 9:35 AM
    • Marked as answer by RobinDotNet Saturday, November 14, 2009 5:34 AM
    Wednesday, October 14, 2009 1:49 PM
  • I talked to someone at Microsoft, and this is a bug in Mage/MageUI. This works fine if deploying via a web server, becuase it handles the %20 as a space in html.

    The solution proposed by prashant_p2b is a good way to work around the problem.

    RobinDotNet
    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    • Marked as answer by RobinDotNet Saturday, November 14, 2009 5:34 AM
    Saturday, November 14, 2009 5:34 AM

All replies

  • I have no idea what SCSF means, and I don't do CAB, but you can add any files you want to to your project and they will be included in the same folder as the exe for your application. Simply add them to your project, set the Build Action to "Content", and set "Copy to output directory" to "copy always". The files will be included in the deployment.

    RobinDotNet
    Click here to visit my ClickOnce blog!
    Thursday, May 28, 2009 1:05 AM
  • Thanks for your reply RobinDotNet. Before I tryed as you said , but acctually i donot like this way, because my application is quite big, so adding lagre number of files to shell project on TFS is not best, and make many disturb for my team and me when developing other tasks.

    Thanks RebinDotNet.
    Thursday, May 28, 2009 2:06 AM
  • If you want to add them to the deployment and not have them be part of the project itself, you will have to add them to the deployment manually using MageUI or Mage after publishing. IIRC, you have to add them to the application manifest (myapp.exe.manifest) and then re-sign it.

    Mage is the command-line version of MageUI. On my machine, they are in a \bin\ folder a couple of levels under C:\Program Files\Microsoft SDKs\. I think they are included with Visual Studio.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Thursday, May 28, 2009 4:30 PM
  • I have used MageUIt.exe to add all files to my.exe.manifest and re-sign it ready. I got the error like said in first question.

    Cannot download the application. The application is missing required files. Contact application vendor for assistance.

    ....

    the detail of doing is followed up this link : http://rajsharma109.squarespace.com/rajs-net-blog/2006/10/12/deploying-a-cabscsf-application-with-clickonce.html


    Thanks
    DX

    Friday, May 29, 2009 1:37 AM
  • Are the files in the deployment folder with the rest of the deployed files? Does it say what files are missing that are required?  Did you re-sign both manifests?

    RobinDotNet
    Click here to visit my ClickOnce blog!
    Monday, June 8, 2009 1:53 AM
  • yeah, i have checked in the deployment folder, all files was in there. As error said :

    ERROR SUMMARY
     Below is a summary of the errors, details of these errors are listed later in the log.
     * Activation of D:\01-Projects\8-ClickOnce\New\Published\WindowsFormsApplication1.application resulted in exception. Following failure messages were detected:
      + Downloading file:///D:/01-Projects/8-ClickOnce/New/Published/Application%20Files/WindowsFormsApplication1_1_0_0_1/WindowsFormsApplication1.exe.manifest did not succeed.
      + Could not find a part of the path 'D:\01-Projects\8-ClickOnce\New\Published\Application%20Files\WindowsFormsApplication1_1_0_0_1\WindowsFormsApplication1.exe.manifest'.
      + Could not find a part of the path 'D:\01-Projects\8-ClickOnce\New\Published\Application%20Files\WindowsFormsApplication1_1_0_0_1\WindowsFormsApplication1.exe.manifest'.
      + Could not find a part of the path 'D:\01-Projects\8-ClickOnce\New\Published\Application%20Files\WindowsFormsApplication1_1_0_0_1\WindowsFormsApplication1.exe.manifest'.

    These files was already existed. I do not know what does the error message mean?

    Yes, i resigned both for application and deployment manifest already.

    Thanks
    DX
    Monday, June 8, 2009 8:34 AM
  • You're installing this from a shared drive or something? My guess would be the %20 is causing you problems. That is html for the space. The application files folder does, indeed have a space in it (don't get me started on how stupid that was, and it's a MSFT thing so you can't change it).

    Do those %20 show up in the paths in the manifest itself? If so, can you change them to a space instead? Or if it's in your original installation location url, you need to take it out of there.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Monday, June 8, 2009 4:23 PM
  • Thank you for your help, I have made a setup for deploying over CD disk(i mean that is not deployment over http protocol). I dont know why generated the path that contain %20 that html for the space as you said.
    You can see it as below:
    <dependency>
        <dependentAssembly dependencyType="install" codebase="Application%20Files\WindowsFormsApplication1_1_0_0_0\WindowsFormsApplication1.exe.manifest" size="8852">
          <assemblyIdentity name="WindowsFormsApplication1.exe" version="1.0.0.0" publicKeyToken="25681d463c445980" language="neutral" processorArchitecture="msil" type="win32" />
          <hash>
            <dsig:Transforms>
              <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
            </dsig:Transforms>
            <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
            <dsig:DigestValue>IFEoRyNUmXX4t8wL1FIzewULYWc=</dsig:DigestValue>
          </hash>
        </dependentAssembly>
      </dependency>

    I have changed %20 to space but when running setup.exe i got a error as below:

    Following errors were detected during this operation.
     * [6/9/2009 9:41:42 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
      - Exception reading manifest from file:///D:/01-Projects/8-ClickOnce/New/Published/WindowsFormsApplication1.application: 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.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
       at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
       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.Deployment.Application.InvalidDeploymentException (SignatureValidation)
      - Manifest XML signature is not valid.
      - Source: System.Deployment
      - Stack trace:
       at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
       at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
      --- Inner Exception ---
      System.Security.Cryptography.CryptographicException
      - The digital signature of the object did not verify.

      - Source: System.Deployment
      - Stack trace:
       at System.Deployment.Internal.CodeSigning.SignedCmiManifest.Verify(CmiManifestVerifyFlags verifyFlags)
       at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)

    This error happend like my expectation because this file has been signed for no change.
    Please help me if you can.

    thanks
    DX

    Tuesday, June 9, 2009 2:49 PM
  • Hi all !!!

    Any solution about it ??


    http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/61023e58-6af5-467b-9aed-216d116a1c23?prof=required&ppud=4

    This error happend like my expectation because this file has been signed for no change.

    HOw can I change

    <dependency>
        <dependentAssembly dependencyType="install" codebase="Application%20Files\WindowsFormsApplication1_1_0_0_0\WindowsFormsApplication1.exe.manifest" size="8852">


    and resign the manifest again, and not %20 character appears, and I get manifest valid ???

    If I have changed %20 to space but when running setup.exe i got a error as below:

    the manifest may not be valid or the file could not be opened.



    I found a lot of answers for this. But no any answer is able to help solve this error for me.

    Please help me if you know any solution.


    Thursday, September 3, 2009 6:59 PM
  • If you don't add the files, and you just deploy the application, can the user install it? I'm wondering if you're doing something wrong when re-adding the files. It certainly doesn't think the manifest has been signed correctly, OR it can't find the files.

    RobinDotNet
    Click here to visit my ClickOnce blog!
    Saturday, September 5, 2009 5:37 PM
  • Hi RobinDot Net,

           I am also facing the same problem as above. When i simply Publish the files it works. But after publish if  i add the data file using mageui.exe this problem occures.
     
    I have tested two cases.

     If update path is http is not having the deployment files. And files are present at http location and Network conection is not present.
     Because if the Setup not acccess the Local folder it will automaticaly searches for http or update fodler.

     Problems occures only for Local folder location and i want to install and update the the program through local drive CD.

    So i rename the Apllication File folder with Apllication_File and rebuilded the manifest files using MageUi.Exe and problem is solved.

    (The Problem is of only Space and charchter %20)
        
    • Proposed as answer by Prashant_p2b Wednesday, October 21, 2009 9:35 AM
    • Marked as answer by RobinDotNet Saturday, November 14, 2009 5:34 AM
    Wednesday, October 14, 2009 1:49 PM
  • I talked to someone at Microsoft, and this is a bug in Mage/MageUI. This works fine if deploying via a web server, becuase it handles the %20 as a space in html.

    The solution proposed by prashant_p2b is a good way to work around the problem.

    RobinDotNet
    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    • Marked as answer by RobinDotNet Saturday, November 14, 2009 5:34 AM
    Saturday, November 14, 2009 5:34 AM