How does Visual Studio let you select a previous .NET framework version when the latest version is an in-place replacement of the earlier version. For example, say I install .NET 4.6 which is an in-place replacement for .NET 4, 4.5, 4.5.1 and 4.5.2, what exactly happens when I choose version 4 to use?
1 Answer. You cannot remove all versions of . NET as Windows (and many apps) rely on it.
In C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework
there are "Reference Assemblies" which have the same public API as the old versions but do not have any implementation.
While you are coding IntelliSense is using those reference versions to show you what is available and what is a compiler error. However when the code is actually compiled the "installed" version is the one that is actually used and compiled against. The reason they can do this is because they keep 100% backward compatibility for the versions they do in place upgrades for so anything written against the 4 API will compile without errors in the 4.6 API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With