14
votes

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?

2
I am not sure, but from what I have heard 4.5 will apply bug fixes to 4.0, which could cause problems with existing applications.eandersson

2 Answers

11
votes

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.

1
votes

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