Click here to Skip to main content
15,880,608 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Is it possible to run .NET application in linux OS
Posted

You should take a look at Mono[^].
There's a starters guide[^] on the website too.
I've never worked with it myself though, so I can't help you beyond this point.
Good luck :)
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 30-Sep-12 11:19am    
My 5, but I worked with Mono and provided my recommendations; please see my answer.
--SA
Sander Rossel 30-Sep-12 11:47am    
Thanks :)
The advice by Naerling is good, but I also worked enough with Mono: it works. Basically, you can develop your applications on Windows or some other platform, and the resulting executable file will work on any other platform under Mono without recompilation.

This is possible because Mono is another implementation of CLR, and because CLR and IL are based on JIT (Just-in-time) compilation. The executable code is loaded on any platform and then JIT-compiled, with usually is done on per-method basis, when a method is about to be called for the very first time.

Please see:
http://en.wikipedia.org/wiki/JIT_compiler[^],
http://en.wikipedia.org/wiki/Common_Intermediate_Language[^],
http://en.wikipedia.org/wiki/Common_Language_Infrastructure[^],
http://en.wikipedia.org/wiki/Common_Language_Runtime[^].

On Mono itself:
http://en.wikipedia.org/wiki/Mono_%28software%29[^],
http://www.mono-project.com/[^].

The possible problems are related, of course, to compatibility. But in this case, this problem is much easier than in other cases. First of all, everything is based on the ECMA-335 standard for CLI, which includes nearly everything, including the specification for the Basic Class Library (BCL):
http://en.wikipedia.org/wiki/Base_Class_Library[^].

If you use only the BCL, most likely your code will be compatible. You should also avoid using any platform specific feature and P/Invoke. But you can also successfully use a number of non-standard libraries, importantly, System.Windows.Forms and ADO.NET. Of course, you can also develop platform-specific code, but just on different platforms.

Please see also my past answers:
C++ GUI For Linux, looking for a place to start[^],
Programming GUI over linux[^],
Platform independency of any visual studio application[^],
I have to develop an exe file that runs on Linux + Windows[^],
how can i use mono in windows7?[^],
To create mono for winforms C#.Net[^].

—SA
 
Share this answer
 
Comments
Sander Rossel 30-Sep-12 11:49am    
Very good answer, my 5! Interesting to know how and why Mono works. Good links too.
On an unrelated note, it seems you've given two answers to this question, one which was unintended :)
Sergey Alexandrovich Kryukov 30-Sep-12 11:55am    
Thank you, Naerling.
Double answer happens around "server overworking" condition sometimes; I'll remover the redundant one; thank you for the note.
--SA
The advice by Naerling is good, but I also worked enough with Mono: it works. Basically, you can develop your applications on Windows or some other platform, and the resulting executable file will work on any other platform und
 
Share this answer
 

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