有选择地禁用.NET Framework版本 [英] Selectively disable versions of the .NET Framework

查看:45
本文介绍了有选择地禁用.NET Framework版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以临时选择地禁用计算机上安装的.NET Framework的一个或多个版本,而无需实际卸载每个版本?当框架的某些版本不可用时,需要检查对程序的影响.

Is it possible to temporarily and selectively disable one or more versions of the .NET Framework installed on a computer without actually uninstalling each one? The need is to check the effect on programs when certain versions of the framework are not available.

推荐答案

基本上是一个很大的否"..NET版本相互覆盖.忽略古老的.NET 1.x版本,您在计算机上只能拥有两个个不同的.NET版本.CLR 2.0.50727版(2.0、3.0、3.5、3.5SP1)涵盖的较旧版本之一和CLR 4.0.30319版(4.0、4.01、4.02、4.03、4.5、4.5.1、4.5.2,4.6).

That's largely a loud "NO". .NET versions overwrite each other. Ignoring the ancient .NET 1.x versions, you can only ever have two distinct versions of .NET on a machine. Either one of older versions covered by CLR version 2.0.50727 (2.0, 3.0, 3.5, 3.5SP1) and one covered by CLR version 4.0.30319 (4.0, 4.01, 4.02, 4.03, 4.5, 4.5.1, 4.5.2, 4.6).

您不能在不严重损坏计算机的情况下可靠地返回CLR分支中的旧版本.您必须先卸载当前版本,然后才能开始安装要测试的版本.当然,这有可能破坏计算机上现有程序的稳定性,Visual Studio是一个很好的例子.它可以被主动阻止;例如,Windows 8计算机将不允许您卸载4.5,并阻止安装3.5SP1之前的任何版本.

You cannot reliably go back to an older version within a CLR branch without doing significant damage to the machine. You'd have to uninstall the current version before you can start installing the one you want to test. This of course risks destabilizing existing programs on the machine, Visual Studio being a prime example. And it can be actively blocked; a Windows 8 machine for example will not allow you to uninstall 4.5 and prevents installing anything older than 3.5SP1.

您必须使用单独的计算机或VM进行测试,该计算机或VM可以引导Windows的较早版本.Windows和.NET版本的组合非常大.因此,请在系统要求中仅说明您愿意支持的内容.

You must use a separate machine or a VM to test this, one that boots an older version of Windows. The combination of Windows and .NET versions is unpleasantly large. Therefore, state in your System Requirements only what you are willing to support.

这篇关于有选择地禁用.NET Framework版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆