none
Why asks ClickOnce for the Common Language Runtime 4.0, which is already installed?

    Question

  • I deploy a VB2010 Express application with ClickOnce. If I install the application on a Windows XP system where the .NET Framework 4.0 is already installed, the installation of my application goes without problems. It is done via a webpage made by ClickOnce, see http://members.home.nl/andrewolff/BeursKoersen/

    To test my installation more, I removed the application from that system and also  the already installed  Microsoft .NET Framework 4 (X86 en X64) and the Microsoft .NET Framework 4 Client Profile (X86 and X64).

    If I run next the same installation,  the installation procedure asks to agree with the Microsoft License agreement for Microsoft .NET Framework 4 (X86 en X64) and Microsoft .NET Framework 4 Client Profile (X86 and X64). After my ‘Yes’ these packages are installed and  the installation procedure continued with the installation of my application.

    However the installation was interrupted by a popup window with the message Can’t install this application. For this application the system should be updated to Microsoft Common Language Runtime Versie 4.0 (translated, the message was in Dutch). I clicked the OK button and did start the installation procedure again. Now there was no message and the application was correctly installed!

    Is this a bug in the ClickOnce software or do I something wrong?

    My ClickOnce deployment files are made via the My Project / Publish tab of the VB2010 Express edition.

    In the Prerequisites window were 2 items checked: Microsoft .NET Framework 4 (X86 en X64) and Windows 3.1 Installer.

    On the My Project / Signing tab nothing was checked.

    On the My Project / Security tab Enable ClickOnce security settings was checked as a full trust application.

    Tuesday, July 20, 2010 7:09 AM

Answers

  • I think the installation of .NET 4 requires a reboot. In some cases, I've seen reports that it does not do the reboot before installing the C/O app. Try turning down the install of the ClickOnce app, rebooting the machine, and invoking the install again. It will skip the prerequisites and install the application successfully.

    If you don't reboot, it is still using the CLR 2.0 ClickOnce engine, and it won't install the .NET 4 app.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    • Marked as answer by Helen Zhou Tuesday, July 27, 2010 1:41 AM
    Tuesday, July 20, 2010 7:13 AM
    Moderator

All replies

  • I think the installation of .NET 4 requires a reboot. In some cases, I've seen reports that it does not do the reboot before installing the C/O app. Try turning down the install of the ClickOnce app, rebooting the machine, and invoking the install again. It will skip the prerequisites and install the application successfully.

    If you don't reboot, it is still using the CLR 2.0 ClickOnce engine, and it won't install the .NET 4 app.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    • Marked as answer by Helen Zhou Tuesday, July 27, 2010 1:41 AM
    Tuesday, July 20, 2010 7:13 AM
    Moderator
  • Hi again Robin.

    So you think too that this is a bug in the ClickOnce software.

    I am sure a reboot will help, but it is not required. By clicking on the OK button of the popup window with the message, the installation is aborted and if I start the installation next again (without a reboot) the application is installed without problems.

    It is strange that this is not reported earlier, because everybody who installs an application were an update of the .NET Framework is done will see this error!

    Andre Wolff

    www.andrewolff.nl

    Tuesday, July 20, 2010 10:49 AM
  • I don't think it is a bug in ClickOnce. All other reports of this say that rebooting fixes the problem. Maybe if you stop it and restart it, it works, because it starts the ClickOnce engine back up, and this time picks up the .NET 4 version.

    I'll send it in to the C/O product team just in case.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Tuesday, July 20, 2010 8:33 PM
    Moderator
  • There's a bug filed in Connect for this. The link to it is given at the bottom of this thread. The more people that go and click "me too" and vote it up, the more likely they will fix the problem. So you might want to do that.

    Here's the link to the connect bug filed with Microsoft:

    https://connect.microsoft.com/VisualStudio/feedback/details/580976/clickonce-and-net-4-cp-prerequisite 

    Here's the thread if you're interested; sounds like the same problem you're having.

    http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/767c7a6f-5e49-4d8f-bacc-eb963b8944d1

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Friday, July 30, 2010 5:53 AM
    Moderator