locked
.NET 4.0 Not Backward Compatible? RRS feed

  • Question

  • Hi,

    On a machine that only has the .NET 4.0 framework installed it won't run a .NET 2.0 application without adding supportedRuntime v4.0.20506 to its config file.  However a .NET 1.1 application will run on a machine with only the .NET 2.0 framework without specifying supportedRuntime.

    Is there any good reason for the change in behaviour?

    Thanks.
    Tuesday, October 13, 2009 10:19 AM

Answers

  • Hello Neil,
    This is actually by design. The goal of 4.0 is that by installing 4.0 on your machine nothing should change for applications which are not targetting 4.0 explicitly (so if they failed because no .NET Framework was installed before, they should keep failing after installing 4.0). It is part of an attempt to make the installation as much non-impactful as possible.

    Another motivation is that 4.0 is a major .NET Framework release and as such has much higher chance of introducing breaking changes (e.g. because further improvement in some feature areas required certain breaking changes by design). Therefore unless an application is tested against 4.0 (in which case it has supportedRuntime=v4.0.*), it is better not to run it on 4.0 rather than taking the chances and failing the app later because of the breaking changes.

    Furthermore this situation should really happen only on Windows XP and Windows 2003 OS, because Vista, Windows 2008 and Win7 all contain .NET Framework 2.0 or higher as part of OS installation.

    I hope this explains it,
    -Karel
    Tuesday, October 13, 2009 6:18 PM
    Moderator