.NET Framework 4.0 does not install when 4.5 is already installed

.net-4.0, .net-4.5, clickonce, visual-studio-2012

Solution

.NET 4.5 is an add-on to .NET 4.0 in terms of the CLR, and as such, when you install .NET 4.5, it includes 4.0. There is a known issue with ClickOnce when it is generated on a machine that has .NET 4.5 installed.

Visual Studio 2012 Update 1 is supposed to fix this issue.

You can set the .NET framework version for your .NET applications inside Visual Studio. When you want to publish a Windows XP compatible version, you should always select .NET 4 or lower as the target framework.

The .NET 4.0 Framework should be listed side by side with 4.5.

This is on a normally installed Windows 8 machine, Visual Studio 2012 Ultimate, without having to install any other framework or SDK.

Problem

I use Visual Studio 2012 for a WPF project needing (at least) .NET Framework 4.0. I have 4.5 already installed, but people with Windows XP cannot install the application (because 4.5 does not run on Windows XP). I use ClickOnce as the deployment application. When I try to intall version 4.0, I get the error (translated from Dutch so the English version might be a bit different): The same or a higher version of .NET Framework 4 is already installed on this computer How can I fix this?

Original source

Related problems