Home Dashboard Directory Help
Search

Clickonce deployment and .NET 4.0 Framework by IRM E-ZEST


Status: 

Active


12
0
Sign in
to vote
Type: Bug
ID: 571570
Opened: 6/28/2010 10:17:41 PM
Access Restriction: Public
1
Workaround(s)
view
10
User(s) can reproduce this bug

Description

We have machine with .NET 3.5 installed. We have clickonce application built in VS 2010 with .NET framework 4.0 and Microsoft visual studio 2010 report viewer as prerequisite.

When we try to install the clickonce application then it prompts for installing the framework , reportviewer and it successfully installs the application, after installing the prerequisites it starts installing the application.

During application installation it throws an error as,

Activation of http://abcd.xyz.com/QLM.application resulted in exception. Following failure messages were detected:
        + Exception occurred loading manifest from file QLM.exe: the manifest may not be valid or the file could not be opened.
        + Cannot load internal manifest from component file.

If any one have the suggestions please reply.
Details
Sign in to post a comment.
Posted by Microsoft on 11/15/2010 at 11:58 AM
Hi,

Thank you for reporting this issue. This problem is a known issue and I agree it could cause unnecessary confusion. Unfortunately, we do not have time to address this request in Visual Studio 2010 but I've added it to our list to consider for future versions. In the meantime, the issue can be worked around by deploying a second time. Please continue to log your suggestions and issues as they play an important part in helping us understand what customers want. While at times we may not be able to get to them immediately (such as in this case), we do note them for future consideration. We very much appreciate your feedback! Thank you!
Posted by Mudbugz on 11/2/2010 at 8:12 AM
I've received this error on both a windows XP 64 and windows 7 64 computer after the .net framework 4.0 finished installing and downloading of the clickonce app. Install works after a reboot or just by running the install a second time.
Posted by L_O_L on 9/18/2010 at 11:34 AM
Hi,
I have also this issue.
In first time , if application needs framework 4.0, setup install it and ask to reboot machine. After rebooting, setup continues to install application sucessfully. But after uninstalling framework 4.0 manually, than install application from related url, it install framework and don't ask to reboot. Continue to install application , then it gets error. Second time to install application successfully install it.

PLATFORM VERSION INFO
    Windows             : 6.1.7600.0 (Win32NT)
    Common Language Runtime     : 2.0.50727.4952
    System.Deployment.dll         : 2.0.50727.4927 (NetFXspW7.050727-4900)
    mscorwks.dll             : 2.0.50727.4952 (win7RTMGDR.050727-4900)
    dfdll.dll             : 2.0.50727.4927 (NetFXspW7.050727-4900)
    dfshim.dll             : 4.0.31106.0 (Main.031106-0000)

SOURCES
    Deployment url            : http://download.example.com/Downloads/ProductInstallation/Publish/Product.application
                        Server        : Microsoft-IIS/7.0
                        X-Powered-By    : ASP.NET
    Deployment Provider url        : http://download.example.com/Downloads/ProductInstallation/Publish/Product.application
    Application url            : http://download.example.com/Downloads/ProductInstallation/Publish/Application%20Files/Product_1_0_0_0/Product.exe.manifest
                        Server        : Microsoft-IIS/7.0
                        X-Powered-By    : ASP.NET

IDENTITIES
    Deployment Identity        : Product.application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0000000000000000, processorArchitecture=x86
    Application Identity        : Product.exe, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0000000000000000, processorArchitecture=x86, 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 http://download.example.com/Downloads/ProductInstallation/Publish/Product.application resulted in exception. Following failure messages were detected:
        + Exception occurred loading manifest from file Product.exe: the manifest may not be valid or the file could not be opened.
        + Cannot load internal manifest from component file.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

WARNINGS
    * The manifest for this application does not have a signature. Signature validation will be ignored.
    * The manifest for this application does not have a signature. Signature validation will be ignored.

OPERATION PROGRESS STATUS
    * [9/2/2010 10:07:09 AM] : Activation of http://download.example.com/Downloads/ProductInstallation/Publish/Product.application has started.
    * [9/2/2010 10:07:10 AM] : Processing of deployment manifest has successfully completed.
    * [9/2/2010 10:07:10 AM] : Installation of the application has started.
    * [9/2/2010 10:07:10 AM] : Processing of application manifest has successfully completed.
    * [9/2/2010 10:07:27 AM] : Request of trust and detection of platform is complete.

ERROR DETAILS
    Following errors were detected during this operation.
    * [9/2/2010 10:07:35 AM] System.Deployment.Application.InvalidDeploymentException (ManifestLoad)
        - Exception occurred loading manifest from file Product.exe: the manifest may not be valid or the file could not be opened.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.Manifest.AssemblyManifest.ManifestLoadExceptionHelper(Exception exception, String filePath)
            at System.Deployment.Application.Manifest.AssemblyManifest.LoadFromInternalManifestFile(String filePath)
            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)
        --- Inner Exception ---
        System.Deployment.Application.DeploymentException (InvalidManifest)
        - Cannot load internal manifest from component file.
        - Source:
        - Stack trace:


COMPONENT STORE TRANSACTION DETAILS
    No transaction information is available.

Posted by Nem on 7/27/2010 at 5:50 PM
The Setup.exe bootstrapper is loading the MSCOREE prior to installing the 4.0 framework. This happens because the download of the .NET redist is of mime type "application/octet-stream" & the CLR registers a MIME filter for this type. URLMon will load up the CLR's MIME filter at the time of the download when only .NET 2.0 runtime is on the machine, causing MSCOREE to initialize g_hShimImplInst to ShimImplStatus_UseV2.

Later the setup bootstrapper uses DFShim to install & start the clickonce application. DFShim calls into MSCOREE to determine the path to the most recent runtime & clickonce components (df.dll, dfsvc.exe). MSCOREE uses the pre-existing ShimImplStatus_UseV2 setting which results in 2.0 click once being loaded. This fails to parse the 4.0 deployment manifest, resulting in the error.

The second run (or run after reboot) will initialize mscoree after the 4.0 fx is present and it will get the proper value for g_hShimImplInst.

This happens when a reboot isn't needed, which will occur on machines that have KB982524 (XP/2003), KB982525 (Vista/2008), or KB98256 (Win7/2008R2). This will become more likely as folks pick up these windows updates.

One potential workaround would be to have our servers set the MIME type to something other than application/octet-stream, but this may not be possible. I am still trying to think of other workarounds.
Posted by Nem on 7/14/2010 at 2:57 PM
We are getting this error too on numerous Windows Vista and Windows 7 machines. In all cases it is after clickonce installs .Net 4 Client Profile. The clickonce manifest and assembly are both signed with a valid certificate.

Sometimes simply trying the install a second time fixes the problem.
Sometimes the user needs to reboot before trying a second time.

Some relevant settings:
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    <TargetFrameworkProfile>Client</TargetFrameworkProfile>
    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <IsWebBootstrapper>true</IsWebBootstrapper>
    <PublishUrl>http://download.example.com/</PublishUrl>
    <Install>true</Install>
    <InstallFrom>Web</InstallFrom>
    <UpdateEnabled>true</UpdateEnabled>
    <UpdateMode>Foreground</UpdateMode>
    <UpdateInterval>7</UpdateInterval>
    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
    <UpdatePeriodically>false</UpdatePeriodically>
    <UpdateRequired>false</UpdateRequired>
    <MapFileExtensions>true</MapFileExtensions>
    <SupportUrl>http://www.example.com/</SupportUrl>
    <ProductName>Our Product</ProductName>
    <PublisherName>Us</PublisherName>
    <SuiteName>Our Suite</SuiteName>
    <WebPage>publish.htm</WebPage>
    <OpenBrowserOnPublish>false</OpenBrowserOnPublish>
    <ApplicationRevision>3</ApplicationRevision>
    <ApplicationVersion>1.0.1.%2a</ApplicationVersion>
    <UseApplicationTrust>true</UseApplicationTrust>
    <CreateDesktopShortcut>true</CreateDesktopShortcut>
    <PublishWizardCompleted>true</PublishWizardCompleted>
    <BootstrapperEnabled>true</BootstrapperEnabled>
    <BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
     <Visible>False</Visible>
     <ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
     <Install>true</Install>
    </BootstrapperPackage>

The error (this occurs after the user installs the prerequisites and then clicks the install button for the application):

PLATFORM VERSION INFO
            Windows                                 : 6.1.7600.0 (Win32NT)
            Common Language Runtime : 2.0.50727.4927
            System.Deployment.dll                     : 2.0.50727.4927 (NetFXspW7.050727-4900)
            mscorwks.dll                         : 2.0.50727.4927 (NetFXspW7.050727-4900)
            dfdll.dll                                 : 2.0.50727.4927 (NetFXspW7.050727-4900)
            dfshim.dll                                : 4.0.31106.0 (Main.031106-0000)

SOURCES
            Deployment url                                 : http://download.example.com/OurProduct.application
                                                                        Server             : Apache
            Deployment Provider url                    : http://download.example.com/OurProduct.application
            Application url                                    : http://download.example.com/Application%20Files/OurProduct_1_0_1_3/OurProduct.exe.manifest
                                                                        Server             : Apache

IDENTITIES
            Deployment Identity             : OurProduct.application, Version=1.0.1.3, Culture=neutral, PublicKeyToken=4fdd38d166a17713, processorArchitecture=x86
            Application Identity             : OurProduct.exe, Version=1.0.1.3, Culture=neutral, PublicKeyToken=4fdd38d166a17713, processorArchitecture=x86, 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 http://download.example.com/OurProduct.application resulted in exception. Following failure messages were detected:
                        + Exception occurred loading manifest from file OurProduct.exe: the manifest may not be valid or the file could not be opened.
                        + Cannot load internal manifest from component file.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
            No transaction error was detected.

WARNINGS
            There were no warnings during this operation.

OPERATION PROGRESS STATUS
            * [7/10/2010 12:55:36 PM] : Activation of http://download.example.com/OurProduct.application has started.
            * [7/10/2010 12:55:36 PM] : Processing of deployment manifest has successfully completed.
            * [7/10/2010 12:55:36 PM] : Installation of the application has started.
            * [7/10/2010 12:55:36 PM] : Processing of application manifest has successfully completed.
            * [7/10/2010 12:55:46 PM] : Request of trust and detection of platform is complete.

ERROR DETAILS
            Following errors were detected during this operation.
            * [7/10/2010 12:55:47 PM] System.Deployment.Application.InvalidDeploymentException (ManifestLoad)
                        - Exception occurred loading manifest from file OurProduct.exe: the manifest may not be valid or the file could not be opened.
                        - Source: System.Deployment
                        - Stack trace:
                                    at System.Deployment.Application.Manifest.AssemblyManifest.ManifestLoadExceptionHelper(Exception exception, String filePath)
                                    at System.Deployment.Application.Manifest.AssemblyManifest.LoadFromInternalManifestFile(String filePath)
                                    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)
                        --- Inner Exception ---
                        System.Deployment.Application.DeploymentException (InvalidManifest)
                        - Cannot load internal manifest from component file.
                        - Source:
                        - Stack trace:


COMPONENT STORE TRANSACTION DETAILS
            No transaction information is available.
Posted by IRM E-ZEST on 7/1/2010 at 11:01 PM
Hi,

What is the status of reported issue.
Posted by IRM E-ZEST on 6/29/2010 at 11:37 PM
Hi,

Sorry, In my previous comment I have mentioned that "machine with .NET 3.5 installed.", please correct that we have machine with Framework .NET FW 2.0 SP 2, .NET FW 3.0, .NET FW 3.5 SP 1, .NET FW 4.0 Client, .NET FW 4.0 Full

Environment details:
1) Windows 7 machine.
2) Framework .NET FW 2.0 SP 2, .NET FW 3.0, .NET FW 3.5 SP 1, .NET FW 4.0 Client, .NET FW 4.0 Full
3) VS 2010.

Steps to reproduce,
1) Create simple Windows application in VS 2010.
2) Right click on project properties, it will open up the property page.
3) Click on compile, clcik on "Advanced compile option" it will open up the pop up "Advanced compiler settings". here selectt the target framework as ".NET framework 4" and click ok.
4) click on the publish button -> click on the Prerequisites and check the check box for the "Mcrosoft .NET Framework 4 (x86 and x64)" and "Microsoft Visual Studio 2010 report viewer", and also select "download prerequisites from components vendor website" and click ok.
5) click on publish button.
6) After this step we deploy the application to our server (windows 2003 server.).
7) While installing the application it prompts to install the prerequisites. Click on accept and it will start installing.
8) After successful installation of the prerequisites, it start downloading and installing the windows application.
9) While installing the windows application it throws an error as,

Activation of http://xyz.abc.com/WindowsApplication1.application resulted in exception. Following failure messages were detected:
        + Exception occurred loading manifest from file WindowsApplication1.exe: the manifest may not be valid or the file could not be opened.
        + Cannot load internal manifest from component file.

10) If I click again on install button of the "publish.htm" page then it application installs perfectly.
11) Then why it give exception at first time?

Please find the attached file of screenshots and error log.

Due to some security issues we can not give you the demo project, instead we can do the screen share to show you the demo project. Please suggest.

If still it is unclear, please feel free to revert back.

Posted by Microsoft on 6/29/2010 at 7:17 PM
Thanks for reporting this issue. In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided.

Please give us a demo project to demonstrate this issue so that we can conduct further research.

It would be greatly appreciated if you could provide us with that information as quickly as possible. If we do not hear back from you within 7 days, we will close this issue.

Thanks again for your efforts and we look forward to hearing from you.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 6/29/2010 at 4:01 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by Nem on 7/27/2010 at 5:54 PM
The only workaround that I have is to edit the Product.xml for DotNetFX40Client and change the "Result" for "ExitCode" "0" from "Sucess" to "SucessReboot". This will force the bootstrapper to restart (along with the user's computer). When it restarts it will continue to install without incident.
File Name Submitted By Submitted On File Size  
Screenshots.docx 6/29/2010 516 KB
Exception.txt 6/29/2010 4 KB