Some time ago I asked here about which really is the .NET Execution Environment (DNX). After reading the answer and the DNX Wiki I came to understand DNX as an interface between the virtual machine on which the managed code executes and the Operating System.
In other words, I started to understand things like this: when working with .NET we are working with managed code that runs inside a virtual machine (formerly CLR only). This virtual machine needs an interface with the operating system, a software responsible for initializing a process to host the virtual machine, initialize it, take care of dependencies, etc. In the new .NET that interface is DNX, correct?
It turns out that DNX has several versions. For example, if we use dnvm upgrade -r coreclr
on Linux x64 we get a DNX named
dnx-coreclr-linux-x64-1.0.0-rc1-update1
While running the same command in Windows we have
dnx-coreclr-win-x64-1.0.0-rc1-update1
In case we realize that although in both cases we are simply requiring .NET Core RC1 Update 1, what we get as DNX depends:
-
From the chosen CLR version - this is reflected in the fact that DNX has in its name the version of CLR 1.0.0-rc1-update1
-
From the operating system used - the DNX name clearly indicates the operating system
-
From the processor architecture - the DNX name indicates that it is also x86 or x64 clearly
For a long time I wondered why: if there is simply a .NET Core and a .NET Full, why are there several versions of DNX?
With the understanding I now have of DNX, I came to understand this as follows: Because it is an interface between the virtual machine (CLR) and the Operating System, DNX depends on the chosen virtual machine (CLR or CoreCLR, as well as its version) and also depends on the specifications of the Operating System on which to run this virtual machine, to be able to mediate correctly between the virtual machine and the Operating System.
That's really the reason why, although we only refer to .NET Core as .NET Core (ie, one thing only), are there several versions of DNX? And, consequently, is this way of understanding DNX the right one? If not out there, what is the real reason for having all these different versions of DNX?