Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does installing .NET 4.5 REALLY replace .NET 4.0 assemblies?

I am now officially confused. The MSDN article on installing the .NET 4.5 framework states the following:

"The .NET Framework 4.5 replaces the .NET Framework 4. When you install the .NET Framework 4.5 on a system that has the .NET Framework 4 installed, the assemblies are replaced."

Why then, do I find the .NET 4.0 assemblies on my file system? When I browse to "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework", I find several folders, including "v3.5", "v4.0" and "v4.5" containing the DLLs for each version. What up?

This tells me that the assemblies of the .NET Framework 4 is not replaced with 4.5 at all. Can someone clarify this for me, please?

like image 441
trbox Avatar asked Oct 22 '12 12:10

trbox


2 Answers

Yes, .NET 4.5 is an in place upgrade, so it does replace the .NET 4.0 assemblies.

See this answer from Hans Passant explaining what the assemblies in the reference assemblies directory are for: Reference Assemblies folder and different assemblies with the same version.

like image 108
dugas Avatar answered Sep 28 '22 11:09

dugas


Yes, NET 4.5 is an in-place upgrade for .NET 4.0 which means that the CLR is the same but new libraries are added as well as bug fixes and performance improvements, and both of the are point to .NET CLR 4.

But, the .NET 4 libraries are actually not gone.

You still can find them in:

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0

(Assume your os is 32bit)

With it, you can target safely against .NET 4 if you've installed .NET 4.5

Go here to find more info

like image 34
Panda Zhang Avatar answered Sep 28 '22 12:09

Panda Zhang