Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How platform-independent is .Net?

Can the .NET framework be installed on Linux, Unix, MAC etc. operating systems?

like image 222
Ravi Avatar asked Feb 20 '11 10:02

Ravi


People also ask

Is .NET is platform dependent or independent?

NET is a language independent platform.

How is ASP.NET platform independent?

ASP.NET itself is not platform independant - it runs on IIS, which is a web server that runs on Windows. The output of ASP.NET is platform independant because it is raw HTML/JavaScript/etc.

Is .NET really cross platform?

NET is a free, cross-platform, open source developer platform for building many different types of applications. With . NET, you can use multiple languages, editors, and libraries to build for web, mobile, desktop, games, IoT, and more.

What is platform independent in C#?

C# is designed to be a platform-independent language in the tradition of Java (although it is implemented primarily on Windows). It's syntax is similar to C and C++ syntax, and C# is designed to be an object-oriented language. There are, for the most part, minor variations in syntax between C++ and C#.


2 Answers

You should have a look at the Mono Project.

Mono is

An open source, cross-platform, implementation of C# and the CLR that is binary compatible with Microsoft.NET

like image 64
Nick Haslam Avatar answered Sep 21 '22 07:09

Nick Haslam


.Net per-se, as most Microsoft sofware, is 100% plataform-dependent. It only works in Microsoft-provided enviroment (like Windows and its different flavors). Theres no official .Net for anything else (Mac, Linux, etc)

BUT...

Some plataforms do try to develop alternatives, emulators, etc, to try to run MS Software. Mono, as Nick posted, is a Linux project to support .Net code to run under Linux.

But Mono is NOT .Net. Its a different sofware, written by different people, that tries to be 100% compatible with .Net (and its actually damn awesome). But its not provided or supported by Microsoft.

And Mono, being an open-source, free sofware, is plataform-independent, as it can be ported to any plataform (currently, it already support several, not only Linux)

So, technically speaking, the correct answer would be:

.Net framework, as provided by Microsoft, is not plataform-indepedent at all. You can not install it in either Linux or Mac

But Mono, an independent, compatible .Net implementation, is supported and avaliable for install in both Linux and Mac, among several other plataforms. And you use it to run code written in .Net

like image 30
MestreLion Avatar answered Sep 18 '22 07:09

MestreLion