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 ?
相关问题
- Generic Generics in Managed C++
- How to Debug/Register a Permanent WMI Event Which
- Is shmid returned by shmget() unique across proces
- 'System.Threading.ThreadAbortException' in
- Bulk update SQL Server C#
An updated answer for 2018 with the current state of the Mono Project in Linux.
mono
repos exist for:The instructions suggest installing
mono-complete
- on Centos I also had to installmono-basic
for VB.NET to work. The current level of support for VB.NET is:which is good enough to run a VB.NET
XML
client which required a3.5
runtime:There is also MainSoft that lets you run on J2EE environment on Linux. It basically compiles the .NET source into Java bytecode.
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.)
Please see Running .Net applications on Linux with Mono:
For running simple .net Applications mono is the tool of your choice! I used it for many applications and it worked without major glitches. I would not reccommend starting to develop on Mono though. Some people in my Class tried to do C# on Linux with mono, and failed terribly.
When you do simple stuff it works good, but when you go to the more advanced stuff like using NHibernate or something like that, it may fail you. And you will miss out the best thing about .net - the Development Environment and that everything works together because everything is provided by Microsoft.
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