Will .NET Framework 4 replace all its previous versions?
When Installing .NET Framework 4 in the near future, I would like to know if this product will replace all the previous .net frameworks that I have installed (i.开发者_StackOverflow中文版e. 1.1, 2.0, 3, 3.5).
If yes, could I uninstall all of them?
No, they can exist alongside eachother. Just like with previous versions. In fact, 4.0 uses completely different directories to store its assemblies in.
Uninstalling will prevent you from using older programs. It is however possible to run 2.0+ software using the 4.0 runtime, with some extra configuration in the application config file. This is not guaranteed to work however, because there are some subtle changes that might break some (arguably badly coded) software.
Update: There is an additional attribute that affects this (useLegacyV2RuntimeActivationPolicy
), although I'm not entirely certain what it does. It was taken from a presentation by Bart de Smet, which I didn't have access to at the time of the original posting:
<!-- Compiled for 2.0; run against 4.0 -->
<configuration>
<startup useLegacyV2RuntimeActivationPolicy=“true”>
<supportedRuntime version=“v2.0.50727”/>
<supportedRuntime version=“v4.0”/>
</startup>
</configuration>
According to my own experience, in the following way you should proceed:
To run .NET applications made with versions 1.0 and 1.1 you need to have installed only the latest higher 1.x library build made by Microsoft (Microsoft .NET Framework 1.1 and SP1 Update Package).
To run .NET applications made with versions 2.0, 3.0 and 3.5 you need to have installed only the latest higher 3.x library build made by Microsoft (Microsoft .NET Framework 3.5 SP1).
To run .NET applications made with versions 4.0, 4.5, 4.5.1 and 4.5.2 you need to have installed only the latest higher 4.x library build made by Microsoft (Microsoft .NET Framework 4.5.2, currently the latest library build for any 4.x).
So, currently, you need to install in your system only these 3 packages (Microsoft .NET Framework 1.1, Microsoft .NET Framework 3.5 SP1 and Microsoft .NET Framework 4.5.2) in your system to get all current and old versions of .NET Frameworks and you can run any .NET application, and is not necessary install other separated package builds such as Microsoft .NET Framework 2.0, 3.0, 4.0, etc, because already are included in the packages mentioned above.
精彩评论