Regardless of the .NET platform?

.NET is a language-independent platform.

But is the platform independent too? How?

EDIT: I heard that .NET 4.0 is designed with form independence in mind. Well, hope this can take over Java if that is the case!

EDIT: The answer depends on how we define the "platform", for example .NET for the Windows platform and Mono for Java.

But the question is that we do not have a common development platform independent of the OS!

Regardless of OS independence, platform independence?

+6
platform-independent
source share
14 answers

It really is a question of how you define a "platform."

for example..NET is platform independent while the .NET platform, just as Java is platform independent while the Java platform. In other words, .NET (and Java) are partly platforms (CLR, JVM). As long as there is an implementation of this platform available for this physical platform, yes, you can execute the compiled code yourself.

After all, “platform independence” is the same as “write once, work anywhere,” marketing. But in practice, there are currently JVM implementations for more specific platforms than .NET (although initiatives such as Mono projects aim to change this).

+18
source share

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

+9
source share

Taken from the wiki :

  • Not. DotNet is not platform independent.
  • Microsoft.NET runs on Windows natively. However, Mono's open source implementation allows it to run on open source systems. However, it does not support all .NET classes, so do not expect something to be fully launched.
  • As you all know, there are different compilers in .NET, such as C # - CSC VB - VBC, etc. Once your code is executed, it will be converted to independent MSIL code. This MSIL code will go to the CLR, and this CLR is platform dependent, that is, for the Unix platform, you must have a CLR for the Unix type, for Windows, like the one so that we can say that the .NET code is independent of platforms.
+5
source share

Not sure what you mean by your question, but if you want to know if the .NET application can run on any OS, there will be no answer to this question.

The .NET Framework is only for certain operating systems, such as Windows. Other projects are available for other platforms, such as Mono on Linux.

+3
source share

There is a cross-platform implementation called "mono". The original versions of .NET from Microsoft are Windows only.

More on the monoproject: http://en.wikipedia.org/wiki/Mono_Project

+2
source share

DotNet is not platform independent or may be partially independent. Although Java is completely platform independent of its JVM (Java Virtual Machine). the best example for understanding independence java u can run a java program in your car microwave, washing machine, or any computer if JVM (Java Virtual Machine) is installed. Java bytecode is independent freeware, it doesn't matter when we used mac, windows, unix.

+2
source share

Mono is a cross-platform implementation of .NET, but Microsoft does not support some features.

+1
source share

There are some .net implementations in linux, it may also be compiled on other systems. It was called Mono .

+1
source share

.Net works fine on MacOSX and Linux if you stick with .Net 2.0. Some new features have also been implemented, such as LINQ, C # 3.0, etc. You should consider that file paths, file permissions, etc. Do not work 100% similarly on different platforms.

Forgot to mention that I'm talking about Mono.

+1
source share

When compiling .NET programming languages, the source code is converted to CIL code, and not to platform or processor-specific object code. CIL is a processor and platform independent command set that can be executed in any environment that supports the Common Language Infrastructure, such as the .NET runtime environment on Windows or the Mono cross-platform runtime environment. Theoretically, this eliminates the need to distribute separate binary files for different platforms and processor types. CIL code is checked for security at runtime, providing better security and reliability than source compiled binaries. The execution process is as follows: The source code is converted to the Common Intermediate Language, the CLI is equivalent to the assembly language for the CPU. Then CIL is compiled into bytecode and a .NET assembly is created. After the .NET assembly completes, its bytecode is passed through the JIT compiler at run time to generate its own code. (Forward compilation removes this step at run time.) The native code is executed by a computer processor. However, Microsoft has made several improvements that are being made on .NET, which are built specifically for windows, leaving Mono (its Linux-based counterpart) much further.

0
source share

.NET is platform dependent, because once the code is written, it obeys the Microsoft Intermediate Language (MSIL) code, which is platform independent, but is semi-compiled code, then the Common Language Runtime (CLR) will convert it to a specific device code t .e. it is platform dependent (MSIL is sent to the JIT via the CLR. At runtime, all memory allocation is performed by the JIT.)

0
source share

As you know, .NET used the framework 4.0. Because of this, the written code (source code) is converted to byte code. This conversion is done through MSIL (Microsoft Intermediate Language). MSIL is a special type of compiler that compiles source code into executable code. Launch or support of any platform. Therefore, due to the use of the MSIL.NET language, the language is cross-platform.

0
source share

.NET is platform independent because it can run on several OS versions / differences (Ex: MONO runs different versions of the .Net framework on many popular operating systems. Http://mono-project.com/Compatibility )

-one
source share

.Net is known as partially platform independent, not fully platform independent. However .Net does support some other operating systems, such as win98, winnt, winserver 2000 and the newer version, as well as Linux. In the same situation, clr is not available for win95, which means that .net cannot be run on win95. Thus, we can say that .net is partially platform independent, not fully platform independent.

-one
source share

All Articles