none
ClickOnce: Manifest may not be valid or file could not be opened

    Question

  • I'm trying to deploy my first WPF 4.0 application using ClickOnce.  I can't send it to an IIS server, because they don't have FrontPage Server Extensions installed, and that isn't likely to change.  So I'm publishing it to a UNC on one of our network shares that everyone has access to.  I've just published it, and included the necessary logic to have it check to see if the .NET Framework 4.0 and Report Viewer control are both installed.  Now I'm testing it by running the setup.exe from off of the network share, on a Windows XP machine with SP3 installed.  It installed the .NET Framework 4.0 and Report Viewer, but then I got an error when it tried to install the app, but I got the following error:

     

    ERROR SUMMARY
    	Below is a summary of the errors, details of these errors are listed later in the log.
    	* Activation of F:\Software\Setup\Wpf RFS\WpfRFS.application resulted in exception. Following failure messages were detected:
    		+ Exception occurred loading manifest from file WpfRFS.exe: the manifest may not be valid or the file could not be opened. 
    		+ Cannot load internal manifest from component file.

     

    OK, what's wrong?
    Rod
    Tuesday, August 31, 2010 5:45 PM

Answers

  • As noted in my response to your other question, you CAN publish your application to a webserver without installing FPSE by using FTP instead of HTTP to publish the files.

    Second, the .NET 4 framework requires a reboot, but I think there's a problem where it doesn't always *force* a reboot. I've been tracking some cases of this, but so far have not been able to find any pattern to it that would make it reproducible and enable Microsoft to fix the problem. In most cases, it installs .NET 4 and then reboots the machine, and continues where it left off with the installation.

    The problem with your manifest might be in the installation URL that you specified. If you deploy to a file share and use a letter to do so, you have to make sure it's mapped as that letter for everybody installing it. The installation URL is part of the deployment identity, and if it doesn't match the manifest, it won't install. This is a security measure to make sure someone doesn't hijack your application deployment. (This is another reason I'd rather use a webserver if I can.)

    RobinDotNet

     


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    • Marked as answer by Rod at Work Thursday, September 02, 2010 3:06 PM
    Wednesday, September 01, 2010 1:44 AM
    Moderator

All replies

  • Follow-up: Since I was testing the deployment onto a Windows XP machine (with SP3), I thought it might be a good idea to reboot the system.  After all, it had to install the .NET Framework 4.0 as well as the Report Viewer control and assembly.  Anyway, then I re-ran the setup.exe from the network share, and that seems to have done it.

    I don't know if that's what I was supposed to do, or not.  If it is, then having the setup.exe raise an error, instead of informing the user that they would have to reboot in order to finish installing things (.NET 4.0 and the Report Viewer assemblies) isn't an elegant solution.

     


    Rod
    Tuesday, August 31, 2010 8:36 PM
  • As noted in my response to your other question, you CAN publish your application to a webserver without installing FPSE by using FTP instead of HTTP to publish the files.

    Second, the .NET 4 framework requires a reboot, but I think there's a problem where it doesn't always *force* a reboot. I've been tracking some cases of this, but so far have not been able to find any pattern to it that would make it reproducible and enable Microsoft to fix the problem. In most cases, it installs .NET 4 and then reboots the machine, and continues where it left off with the installation.

    The problem with your manifest might be in the installation URL that you specified. If you deploy to a file share and use a letter to do so, you have to make sure it's mapped as that letter for everybody installing it. The installation URL is part of the deployment identity, and if it doesn't match the manifest, it won't install. This is a security measure to make sure someone doesn't hijack your application deployment. (This is another reason I'd rather use a webserver if I can.)

    RobinDotNet

     


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    • Marked as answer by Rod at Work Thursday, September 02, 2010 3:06 PM
    Wednesday, September 01, 2010 1:44 AM
    Moderator
  • The manifest is deployed to a network file share, and I do use a letter (F, in this case).  However, that letter is the same for everyone in our organization, since it is assigned through a group policy object in Active Directory.

     


    Rod
    Thursday, September 02, 2010 3:05 PM
  • That should work. Do you have any kind of COM components that you are deploying, or is everything .NET?

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Friday, September 03, 2010 6:29 PM
    Moderator
  • No COM components of any kind, that I'm aware of.  Unless the Report Viewer in VS 2010 is a COM component.

     


    Rod
    Friday, September 03, 2010 7:55 PM
  • Hi Robin:

    Have you found a workaround for this?


    Daniel Pereira
    Tuesday, January 25, 2011 8:01 PM
  • For which problem? The problem with .NET 4 not always forcing a reboot when it should?  I don't think they've fixed that yet. Maybe in SP-1.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Wednesday, January 26, 2011 8:03 AM
    Moderator