8

How can I install the .NET 4.0 Framework on Windows 8 Pro / Visual Studio 2012 Professional?

I get this:

enter image description here

and if I follow the link of Install other frameworks... I get into Microsoft page where I find this information:

enter image description here

I have then installed .NET Framework 4.0.1 Targeting Pack and .NET Framework 4.0.2 Targeting Pack as I can't install 4.0.3, restarted the machine over an over, but Visual Studio continues not to show the framework on the dropdown menu.

What am I doing wrong?

Here is what regedit says what I have installed on my machine:

enter image description here

2 Answers2

4

I had this same thing after uninstalling VS2015 community, my VS2010 projects all started blowing up with this. My issue was I was missing FrameworkList.xml from C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\RedistList. I copied from another machine and the problem went away.

Brian
  • 56
  • 1
3

.NET 4.5 is an in-place update to the 4.0 framework. Contrary to .NET 3.0 and 3.5 which were built on top of 2.0, .NET 4.5 replaces 4.0.

In fact if you have a client Windows machine with .NET 4.0 installed and install 4.5 it will update both the client and extended profiles to 4.5 (and in 4.5 there is no client and extended profiles anymore, comes in full).

I'd suggest you target 4.5 directly, but if you do need to target 4.0 maybe VS2010 needs to be installed too; I have it along with VS2012 and .NET 4 targetting appears in the frameworks list:

enter image description here

Xandy
  • 3,470