Before the recommended Linux Mono system, I would like to give you a better understanding of the Linux Mono system, and then give a comprehensive introduction to the Linux Mono system. I hope it will be useful to you When Microsoft starts it. NET strategy, one of the goals is to make the software run on a variety of different platforms.
Use C # Fedora in Linux)
Linux Mono, an open-source project that enables. NET to run on your Linux operating system. If you work like me, either using the Linux Mono technology or using Linux, then this Mono will help you and me. You can write C # programs on both platforms. Download the latest installation package for Linux Mono from the www.go-mono.com. I read it. When I wrote this article, Mono 1.1.13.8 was the latest Stable version on the official website.
Before installing Linux Mono, you must determine whether you have GIMP Toolkit, Drawing Kit, and pkg-config. You can download them on rpmfind.net. We recommend that you download the latest version. If you have these software on Linux, you may need to upgrade them.
Install the software below:
# Rpm-Uvh glib2-2.0.0-1.i386.rpm
# Rpm-Uvh glib2-devel-2.0.0-1.i386.rpm
# Rpm-Uvh pkgconfig-0.12.0-1.i386.rpm
Next, extract Mono:
# Tar-zxvf mono-1.1.13.8.tar.gz
Next:
#./Configure
# Make
# Make install
After the preceding steps are completed, your Linux system has a working Linux Mono, which includes the Mono C # compiler, Linux Mono instant compiler, and mintThe Mono interpreter ). Now you can write C # program. For example, hey, write the most famous Hellow World Program:
Class Hello {static void Main () {System. Console. WriteLine ("Hello World ");}}
Haha, it is really a classic. C # the program must be suffixed with. cs. Enter the program and save it. For example, save it as HelloWorld. cs and compile it:
# Mcs Hello. cs
If you write all programs, this command will generate a MSIL file named helloworld.exe, and then you can use this file:
# Mint HelloWorld.exe
Hello World
Mint interprter has many optional commands, including -- trace and -- debug, which are useful for debugging. When your program has been completed, you can compile it on the JIT compiler:
# Mono HelloWorld.exe
Hello World
The public Language Runtime Library provides cross-platform capabilities .. . NET program can run on any system with CLR installed. In fact, the C # compiler of Mono is compiled on the Windows platform using the Microsoft. NET Framework SDK and then moved to the Linux platform. You can convert the compiled program on Windows to Linux and run it.
Linux Mono has not fully implemented the. NET Framework, but it is enough for you to run the program you want to write. Open-source things generally evolve quickly, and may soon be able to fully meet your needs.
By the way, there is a Gtk # project on the gtk-sharp.sourceforge.net, which is committed to binding gtk + toolkit to the C # language. It is also designed to provide libraries compatible with Windows. Forms under Linux Mono. Of course, it is difficult to migrate from Windows to Linux. Let's keep an eye on its progress.
- Compile and install mono 2.0 in Ubuntu nginx Environment
- About Installing Ubuntu Mono by default
- Mono 2.4.3 is released, supporting all functions of C #4.0
- Mono will enter Debian's default installation package
- The Mono project continues to promote Linux-based. NET Development