简体   繁体   English

.NET Framework 4是否会取代以前的所有版本?

[英]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 (ie 1.1, 2.0, 3, 3.5). 在不久的将来安装.NET Framework 4时,我想知道这个产品是否会取代我安装的所有以前的.net框架(即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. 实际上,4.0使用完全不同的目录来存储其程序集。

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. 但是,可以使用4.0运行时运行2.0+软件,并在应用程序配置文件中进行一些额外配置 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. 更新:有一个额外的属性影响这个( useLegacyV2RuntimeActivationPolicy ),虽然我不完全确定它的作用。 It was taken from a presentation by Bart de Smet , which I didn't have access to at the time of the original posting: 它取自Bart de Smet的演示文稿,我在原始发布时没有访问权限:

<!-- 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). 要运行使用版本1.0和1.1创建的.NET应用程序,您需要仅安装Microsoft制作的最新的高级1.x库(Microsoft .NET Framework 1.1和SP1更新包)。

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). 要运行使用版本2.0,3.0和3.5制作的.NET应用程序,您需要仅安装Microsoft(Microsoft .NET Framework 3.5 SP1)制作的最新的高级3.x库构建。

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). 要运行使用版本4.0,4.5,4.5.1和4.5.2创建的.NET应用程序,您需要仅安装Microsoft制作的最新的高级4.x库构建(Microsoft .NET Framework 4.5.2,目前是最新的库构建任何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. 因此,目前,您需要在系统中仅在系统中安装这3个软件包(Microsoft .NET Framework 1.1,Microsoft .NET Framework 3.5 SP1和Microsoft .NET Framework 4.5.2)以获取所有当前和旧版本的.NET框架和您可以运行任何.NET应用程序,并且不必安装其他独立的软件包构建,如Microsoft .NET Framework 2.0,3.0,4.0等,因为已经包含在上面提到的软件包中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM