To answer this question, I believe that a clear distinction must first be made between the CLI and .NET:
The CLI (short for Common Language Infrastructure) is standard and therefore designed to be more platform independent. Here, the platform refers to the underlying computer architecture, including the operating system.
Although it is possible that the standard requires certain things that cannot be implemented on all architectures (I mean very limited platforms, such as embedded systems), but this can perhaps be considered edge cases.
.NET is the principal CLI implementation from Microsoft and only works on Windows systems. Therefore, .NET is platform independent.
Update (August 2015) . At the end of 2014, Microsoft announced that it planned to gradually open parts of the .NET Framework (in particular, those parts that are important for server applications). The result is the .NET Core .NET Foundation .
.NET Core is designed for cross-platform implementation of the CLI.
Mono is also an implementation of the CLI, but one is designed to work on different platforms such as Linux and Windows. Mono is definitely more platform independent than .NET.
Secondly, the problem of binary compatibility of compiler output. Since the CLI standard defines the file format (the form of PE executables) and the intermediate code language (called CIL) that will be used for assemblies, you can mix components written in VB.NET, C #, and some other languages freely after the source code was compiled with CIL .
In this sense, the CLI (and with it all its corresponding implementations, such as .NET) is language independent.
Interestingly, you can compile something with Microsoft.NET compilers, and because of the general assembly file format prescribed by the standard, you should be able to use assembly in a Mono project - and vice versa. In this sense, .NET tooling may be considered platform independent - but not .NET itself. Remember that the .NET Framework also includes a standard library designed for Windows (such as WPF).
stakx
source share