9
votes

I’m trying to deploy a WPF application using ClickOnce.
The project’s target framework is: “.NET Framework 4.5”.
In the VS project properties -> “Publish” -> “Prerequisites” I have checked two items:

  • “Microsoft .NET Framework 4.5 (x86 and x64)”
  • “Windows Installer 4.5”

When I try to launch this application on a Windows 7 computer that doesn’t have .NET 4.5 preinstalled I get a popup saying:

System Update Required Unable to install or run this application. This application requires Version 4.5 Full or other compatible .NET Framework. Please contact your system administrator.

The installation does not attempt to download/install the framework for me. It simply gives up displaying this message. The client user running the ClickOnce installation has administrator privileges on the machine.

Why doesn’t ClickOnce install .NET 4.5 automatically?

6
Is the group policy on the machine preventing the installation?ChrisF♦
The machines are hosted in a Windows domain at our company network. I’m not a group policy expert, but our IT operation manager told me that they hadn’t set up any special restrictions. I have not tried to reproduce this issue on any computers outside our domain. Maybe I will do this at a later time or maybe someone else here can tell me if they get the same results as I did when doing the upgrade?SteffenSH

6 Answers

2
votes

I left out to mention in my question that I was upgrading from another ClickOnce application with prerequisites on .NET4.

ClickOnce prerequisites are only evaluated on the first installation so to upgrade to .NET4.5 I followed a technique described here. I.e. the old application uninstalls itself and then launches the installation of the new ClickOnce application with the new prerequisites on .NET4.5.

        Process.Start("iexplore.exe", newClickOnceApplicationUrl);
        Application.Current.Shutdown();

Some machines got the error message (“Please contact your system administrator.”) and some installed ok without any problems. On the machines that got the error it worked ok if the ClickOnce url was launched manually.

All users running the install were part of the Administrators group for their local machine. My theory is that the iexplorer.exe process launched from ClickOnce did not run under administrator privileges on the machines that had the problem. I did not investigate this any further though.

2
votes

I had the same problem with an application that was set to target .net framework 4.0 in the past. First I just updated the target platform to .net framework 4.5, however the ClickOnce installer did not update its prerequisites.

What I had to do was Project Properties -> Publish -> Prerequisites -> Change from .net framework 4 to .net framework 4.5. Then 4.5 was installed during deployment.

1
votes

The re-installation of your application should solve the problem.

Application's ClickOnce prerequisites are checked, and, if necessary, ran, when you install your application on the machine, and not when you launch an already installed .NET application.

0
votes

Not seen this one before but it sounds like the client already has .NET installed, but the client profile "lite" version? Two ways around this:

  1. If you can, change the build target to .NET 4.5 Client and rebuild your product (you will receive errors if you're calling into what Microsoft consider "server" components of the framework)
  2. If you really can't do without the full version of .NET, remove the client version from the machine and try again?

Does this help at all?

0
votes

Some what this error looks familiar!!!

Did you try to do this ???

In the Prerequisites dialog box, make sure that the Create setup program to install prerequisite components check box is selected.

In the "Specify the install location for prerequisites section", select Download prerequisites from the following location.

Select a location from the drop-down list, or enter a URL, file path, or FTP location, and then click OK.

http://msdn.microsoft.com/en-us/library/8st7th1x(v=vs.100).aspx

-2
votes

Do the following

Download .netframework 4.5 fullinstaller here DOTNETFRAMEWORK 4.5

then copy it to this directory

C:\Program Files\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages\DotNetFX45

then clean your project and Build again then published.. it will work now.. please let me know if you solve the problem with my answer