4

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.

2 Answers 2

4

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).

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.

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.

Sign up to request clarification or add additional context in comments.

Comments

1

It is not possible as far as I know. We have done similar things by using virtual machines with different snapshots with the .NET Framework versions we want to check.

You can automate the VMware machines with an SDK to make the whole process automatic.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.