.NET 4.5 and how it sits in the .NET ecosystem

tl;dr

Introduction

.NET 4.5 is the next release, and it is important to understand how it fits into the .NET ecosystem. This is the 8th major release of .NET! What do I mean by major release? I mean any release that is not a patch or support-only release, or, put another way, a major release includes major new features in the CLR and/or new language options.

SxS vs. Replacement

In .NET, we are lucky that many versions can run side by side (SxS) as long as they have different versions of the CLR. However, if a new major release shares the same CLR, it is a replacement/additive version. For example: .NET 3.0 used the same CLR as .NET 2.0 (CLR 2.0), and when installed, it replaced many of the files in .NET 2.0 with new versions. Only via compiler directives are some things turned on and off. The advantage of the SxS model is that installing a new version doesn’t influence apps on the previous version in any way (i.e., if the app is 1.1 and works fine before .NET 2.0 was installed, it will keep working fine after .NET 2.0 is installed).

The problem with the replacement model is that there is a chance installing a new version breaks apps on the original version—however, Microsoft does a ridiculous number of tests to ensure this doesn’t happen, so that chance is very small. In fact, if you encounter such an issue, the chance is higher that you are using undocumented features or using features incorrectly.

The reason for explaining SxS vs. replacement is that .NET 4.5 is an in-place replacement for .NET 4.0.

Version Naming

Part of the confusion I suspect arises from my claim that .NET 4.5 is the eighth release, considering Microsoft’s naming of versions is about as far from logical as it gets. The worst examples include:

Another aspect is that versions of the CLR, versions of the framework, and versions of the languages are completely out of sync. For example, .NET 4.5 runs on CLR version 4, and we write code in C# version 5.0 or VB version 11.0—because that makes sense. :S

Awesome Poster

Here is an awesome poster to help remind you of all the above!

image