Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run .net application on Linux environment?

Tags:

.net

linux

Is it possible to run a .net application on Linux environment? If yes then how? Will all the components of .net framework work properly on Linux ?

like image 988
pirate Avatar asked May 20 '09 10:05

pirate


People also ask

Can we run .NET application on Linux?

NET Core, open source and available to run on any platform. Windows, Linux, MacOS, and even a television OS: Samsung's Tizen. Add in Microsoft's other . NET flavors, including Xamarin, and you can add the iOS and Android operating systems to the list.


5 Answers

Please see Running .Net applications on Linux with Mono:

Imagine the fate of your company rests on your completing your new Linux project on time. You have a crack team of first-class developers, but they're all .Net programmers. What are you going to do? Admit that Windows is better that Linux? Cry? Resign? No, you're going to install Mono and save the world!

like image 55
Andrew Hare Avatar answered Sep 28 '22 15:09

Andrew Hare


While there are alternatives (I believe), Mono is probably what you want.

It doesn't support everything that .NET supports, but there's a compatibility tool which will check for you. (I wouldn't blindly trust the results of the compatibility tool to be 100% accurate, as there will always be a few sneaky unknown incompatibilities, but it's a very good start.)

like image 22
Jon Skeet Avatar answered Sep 28 '22 14:09

Jon Skeet


A new answer for an old question, as technology improves. You might also consider running your app as a dotnet core application. The same code will work nativly with MAc Windows and linX download dotnet runtime for your OS and on a console type Dotnet .\yourapp.dll

like image 45
Peter Avatar answered Sep 28 '22 16:09

Peter


There is also MainSoft that lets you run on J2EE environment on Linux. It basically compiles the .NET source into Java bytecode.

like image 26
RichardOD Avatar answered Sep 28 '22 16:09

RichardOD


An updated answer for 2018 with the current state of the Mono Project in Linux.

mono repos exist for:

Ubuntu
Debian
Raspbian
CentOS
Fedora
Docker

The instructions suggest installing mono-complete - on Centos I also had to install mono-basic for VB.NET to work. The current level of support for VB.NET is:

default runtime: v4.0.30319

which is good enough to run a VB.NET XML client which required a 3.5 runtime:

enter image description here

like image 33
Stuart Cardall Avatar answered Sep 28 '22 16:09

Stuart Cardall