.net 4.6 framework is inplace upgrade then how is the .net framework 4.5 works in vs2015?
Asked Answered
V

2

6

.net 4.6 framework is inplace upgrade then how is the .net framework 4.5 works in vs2015? I see only one folder v4.0.30319 . How is the dll stored and where ?

Varietal answered 21/9, 2015 at 15:51 Comment(6)
Have a look at ".NET Framework Versions and Dependencies" on MSDN for some additional information.Amy
Thanks Lee.. Is there a way I can check the assembl/dll of the framework 4.5 and 4.6 physically in the system ?Varietal
You should use the Release DWord to determine the installed version of .NET (if that's what you are asking).Amy
No ... Visual studio 2015 has both the framework 4.5.2 and 4.6. So, I want to know where the dlls of the framework 4.5.x is stored and where is the dlls/assembley of the 4.6 is stored physcially. The location of it. Whart I basically mean is this Assemblies and Side-by-Side Execution .msdn.microsoft.com/en-us/library/fdhkd3a5(v=vs.110).aspxVarietal
I'm pretty sure there is one set of .dlls. It's an in-place upgrade. Somebody with more knowledge will probably chip in here, but I think I am right.Amy
For the path to the .dll, try this: typeof(object).Module.FullyQualifiedName.Amy
W
2

Update: Note that Reference Assemblies only contain metadata and NOT any code at all. Thanks @vcsjones for pointing this out below!

You can find a "Reference Assemblies" folder on your system in which the exact binaries for each framework version are kept:

Reference Assemblies folder screenshot

Visual Studio then uses those depending on which version you are targeting. This is the System.dll reference from a project targeting .Net 4.5.1:

VS assembly reference screenshot

Winola answered 11/12, 2015 at 11:32 Comment(2)
Reference assemblies don't contain the actual code, they are pure metadata. If you actually look at the assemblies with a decompiler, all of the methods are empty.Motherhood
@vcsjones: You are absolutely right. I have to admit I did not know that until you've pointed it out (did indeed check with a decompiler). Thanks for your comment!Winola
M
13

.NET Framework 4.5 was an in-place upgrade for 4.0. 4.5.1 was an in-place for 4.5. 4.5.2 was an in-place for 4.5.1. 4.6 is also in place.

So it goes to reason that the 4.6 framework installs the v4.0.xxxxx directory.

Now, Visual Studio 2015 supports .NET Framework 4.5 for targeting. When you create a project that targets the 4.5 Framework, it limits you to using features that are only available in that version of the framework. If you have .NET Framework 4.6 installed (and you will with Visual Studio 2015), and target 4.5, the code will still be execute using the 4.6 Framework.

Motherhood answered 21/9, 2015 at 16:14 Comment(3)
How is dll in the system get stored for 4.6 after I install ? Does the dlls of older version 4.5 remain ? If yes where ? Can you share the path ?Varietal
"Does the dlls of older version 4.5 remain" No.Motherhood
This should be the accepted answer as it points out the same danger already posted for previous in-place updates of the .NET framework: https://mcmap.net/q/209326/-can-visual-studio-2012-be-installed-side-by-side-w-visual-studio-2010Gilgilba
W
2

Update: Note that Reference Assemblies only contain metadata and NOT any code at all. Thanks @vcsjones for pointing this out below!

You can find a "Reference Assemblies" folder on your system in which the exact binaries for each framework version are kept:

Reference Assemblies folder screenshot

Visual Studio then uses those depending on which version you are targeting. This is the System.dll reference from a project targeting .Net 4.5.1:

VS assembly reference screenshot

Winola answered 11/12, 2015 at 11:32 Comment(2)
Reference assemblies don't contain the actual code, they are pure metadata. If you actually look at the assemblies with a decompiler, all of the methods are empty.Motherhood
@vcsjones: You are absolutely right. I have to admit I did not know that until you've pointed it out (did indeed check with a decompiler). Thanks for your comment!Winola

© 2022 - 2024 — McMap. All rights reserved.