We help IT Professionals succeed at work.

Can't install .NET 4.5 on Windows 10 computer.

High Priority
115 Views
Last Modified: 2020-01-27
I recently had to build a new computer due to a hard drive failure.  I'm trying to install several compilers and tool kits, it's a very bumpy road.  I have several web site projects VS2010 using Infragistics products which are version "Infragistics45.Web.v15.2, Version=15.2.20152.2125".  I can see that the .NET framework for 4.0 has been installed on my computer but when I try to install .NET framework 4.5 I get a message "Microsoft .NET Framework 4.5 is already part of this operating system".  When I open the project and click "Start Options" and select "Build", it only shows .NET framework 4.  How can I get 4.5 installed?
Comment
Watch Question

Paul MacDonaldDirector, Information Systems
CERTIFIED EXPERT

Commented:
I believe the version of "4" on Windows 10 includes version 4.5 (indeed, it may say so, if you dig down into the verbiage).

If you're sure you're having a problem, try Microsoft's .NET Framework Repair Tool.

Author

Commented:
Thanks, I tried the repair tool but no success.  Tried after to install the 4.5 framework, it still says it is already part of the OS.
Then I open my project in VS2010 and click the Start Options and select Build, it still doesn't show 4.5.
Paul MacDonaldDirector, Information Systems
CERTIFIED EXPERT

Commented:
The couple times I've run into this the repair tool has handled it for me.  

Have you tried...
     SFC /ScanNow
...and...
     DISM /Online /Cleanup-Image /RestoreHealth

If not, give them a try - one after the other - and take note of success or error messages.
Paul MacDonaldDirector, Information Systems
CERTIFIED EXPERT

Commented:
Oh, wait!  I just realized you're using VS2010!  That won't target the .NET Framework 4.5 even if it's available.  Sorry I didn't realize that sooner.  You'll have to move to VS2012 (at least) to target .NET Framework 4.5.

Additional references, if you want them:
"is it possible for visual studio 2010 ultimate to work with .net 4.5"
".Net Framework 4.5.2 not a choice"
gr8gonzoConsultant
CERTIFIED EXPERT

Commented:
Just to expand on what Paul said, you are dealing with 2 different things.

1. There is the .NET Framework that you install in order to RUN .NET applications. That is what you already have installed, so because you have 4.5 installed, you will be able to execute .NET apps that were built for 4.5.

2. In Visual Studio, if you want to BUILD a .NET application for a specific .NET version, then you are dealing with "Target frameworks", which are installed via developer packs, like this one:
https://www.microsoft.com/en-us/download/details.aspx?id=42637

When you first install Visual Studio, it'll come with whatever developer packs / target frameworks are standard or common at that particular time of release, and you can install more separately (like the developer pack mentioned above). However, there ARE some version requirements for different packs. As Paul said, the minimum version of Visual Studio required for the 4.5 developer pack is VS 2012, so you'll have to upgrade VS to start building newer apps that target newer frameworks. I know VS isn't the cheapest thing, but 2010 is now a whopping 10 years ago. There have been a lot of improvements over the years (and you might want to check out the free community edition of Visual Studio in case you are eligible to use it).

This documentation from Microsoft talks more about target frameworks and has a handy list of download links for each developer pack:
https://docs.microsoft.com/en-us/dotnet/framework/install/guide-for-developers
SoulwinnerIT Manager

Commented:
Uninstall .net  - Turn windows features on/off under program and features and uncheck .net

restart the pc and download .net from Microsoft and install

Author

Commented:
I have the framework for 1.1, version 4, and version 4.5 installed.
apparently 4.5 was part of the Windows 10 operating system.

Are you saying that I should Uninstall all the .NET Framework instances?

Author

Commented:
gr8gonzo - I understand what you are saying about VS2012, but I had all these web sites running under VS2010 on a Windows 7 Pro operating system.  I may be confusing other issues here.
gr8gonzoConsultant
CERTIFIED EXPERT

Commented:
You're still confusing the two framework concepts. You don't have to uninstall anything.

Think of it this way - you have people like yourself who USE computers and also people who BUILD computers.  

The people who USE computers simply need the cables to connect the computer to their house's power.

The people who BUILD computers need tools like screwdrivers, anti-static wrist straps, etc...

Similarly, there are two types of frameworks. You have the USER type, like the 4.5 that comes with Windows 10. The only purpose of these USER frameworks is to let you run .NET applications. They do not provide any development functionality.

If you install the .NET 4.7 framework, you are not giving Visual Studio the ability to build .NET 4.7 applications. You are simply giving your computer the ability to run .NET 4.7 applications. In our analogy, it is the set of cables to plug in the computer.

If you want Visual Studio to build higher versions of .NET applications then you need the DEVELOPER type of framework (called a "targeting" framework). It does not replace the USER framework. It is a completely different type of software. In our analogy, this is the set of screwdrivers and stuff like that for building a computer.

So the sole purpose of the .NET 4.7 DEVELOPER ("targeting") framework is to allow Visual Studio to BUILD .NET 4.7 applications. That's all.

So you can install every single version of the USER type of framework but it will not change what Visual Studio can do.

Everyone installs the normal frameworks. Only developers need to also install the targeting frameworks.
gr8gonzoConsultant
CERTIFIED EXPERT

Commented:
Also, a note on the .NET USER frameworks...

Each .NET framework before 4.0 is required to run that specific version of .NET application.

.NET 1.1 framework: runs .NET 1.x applications

.NET 2.0 framework: runs .NET 2.x applications

.NET 3.5 framework: runs .NET 3.x applications

.NET 4.0 framework: runs .NET 4.0 applications

.NET 4.5 framework: runs .NET 4.0 through 4.5 applications

.NET 4.7.1 framework: runs .NET 4.0 through 4.7.1 applications

All of the .NET 4.x frameworks supersede each other and are backwards compatible. In other words, you don't need to install 4.0 and 4.5 and 4.7. You can just install 4.7 and be able to run all .NET 4.0, 4.5, 4.6, and 4.7 applications. Then then you install 4.8 later on, it will replace the 4.7 version and add on the ability to run 4.8 applications.

Again this is all referring to USER frameworks. You had talked about uninstalling things so I wanted you to understand how they are installed and what each one does for you
Thanks gr8gonzo for the detailed explanation.  I think that by using the repair tool I am able to run the previously developed projects.  Thanks for everyone's help.