Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
i want to know is .net is platform independent? yes or no? if yes why? if no why?
Posted

This is not as simple. .NET is just one implementation of CLR (http://en.wikipedia.org/wiki/Common_Language_Runtime[^]). CLR is standardized and is implemented on a number of different platforms, mostly via Mono:
http://en.wikipedia.org/wiki/Mono_%28software%29[^],
http://www.mono-project.com/Main_Page[^].

There are some more, more or less complete CLR implementations.

Microsoft Singularity:
http://en.wikipedia.org/wiki/Singularity_%28operating_system%29[^],
http://research.microsoft.com/en-us/projects/singularity/[^];

Cosmos:
http://en.wikipedia.org/wiki/Cosmos_%28operating_system%29[^],
http://cosmos.codeplex.com/[^];

SharpOS:
http://en.wikipedia.org/wiki/SharpOS_%28operating_system%29[^],
http://www.sharpos.org/[^];

ETH Zurich — Microsoft Research Barrelfish:
http://en.wikipedia.org/wiki/Barrelfish[^],
http://www.barrelfish.org/[^].

Microsoft Midori (code name):
http://en.wikipedia.org/wiki/Midori_%28operating_system%29[^].

You should understand that .NET applications confined to the use of standard only (BCL, in particular), run on all those platforms (or will run) without re-compilation.

Now, everything else is reduced to terminology. If people were calling all of the above ".NET", the answer would be that it is a cross-platform system or itself can serve as a platform. However, it so happens that the name ".NET" is reserved
for narrower set of products. "Platform-independent" would not be right in all cases. Behavior always depends on platform (imagine the application which should print platform name; of course, the result will depend on platform :-)), but the applications can behave in a highly platform-compatible way.

—SA
 
Share this answer
 

  • Platform independence means that any program should be able to run on any machine where the framework is implemented.
  • .Net is not platform independent as it requires large number of functions in the libraries that can only be implemented on Windows.
  • ECMA C# and Common Language Infrastructure Standards-Specifiaction for platform independency[^]

  • However Mono[^] is an open source implementation of Microsoft's .NET Framework based on the ECMA standards for C# and the Common Language Runtime. It, however, doesn't support all .NET classes, so don't expect anything to run completely there.


so at the end If you ask-is .net is platform independent?: I will say Partially. Its not easy to say completely "Yes".
But It is possible to run the .net application to run in cross platform using mono or other however it doesn't runs completely.
 
Share this answer
 
v4
.Net is not platform independent and depends on Windows as the OS.

Silverlight did go the platform independent way but if you use Com Interop etc in SL, you could be tied down to Windows as an OS.

A similar question was asked before. Go through the answers here[^].
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 6-Feb-13 2:09am    
Abhinav, sorry, but this answer is very inaccurate and even misleading.
Please see my answer to see what I mean.
(I don't want to down-vote it this time, want just to convince you.)
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900