We know that mono is a cross-platform, open-source. NET Development Framework. It was developed by Novell based on the SUSE Linux operating system.
Although developing C # programs under the OpenSUSE operating system makes it easy to get the latest mono development environment, I prefer the Ubuntu operating system.
Since the Ubuntu operating system includes both "Tomboy" and "F-spot Photo Manager" applications developed using C #, it already includes the Mono runtime and does not require additional installation.
However, to use the C # compiler, you must use the sudo apt-get install mono-devel command to install the Mono development environment.
Then, after you edit the C # source program using VI or GEDIT, you can use GMCs to compile.
Is the example of using VI to edit C # source programs. Presumably veteran Unix programmers have a VI complex.
[email protected]:~/work$ mono--version Mono JIT compiler version 2.4.2.3 (Debian 2.4.2.3+dfsg-2) Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com TLS: __thread gc:included Boehm (with typed GC) Sigsegv:altstac K notifications:epoll architecture:amd64 disabled:none[email protected]:~/work$ GMCs--vers Ion Mono C # compiler version 2.4.2.3[email protected]:~/work$ GMCs ClrInfo.cs [email protected]:~/work$ ./clrinfo.exe OS Version:unix 2.6.31.14CLR version:2.0.50727.1433default encode:system.text.utf8encoding[email protected]:~/work$
This is the case where the Clrinfo program compiles and runs.
The results of the same Clrinfo program running in Windows Server 2003 R2 Enterprise Edition are as follows:
ClrInfo.exe OS version:microsoft Windows NT 5.2.3790 Service Pack 2CLR version:2.0.50727.3603default Encode:System.Text.DBCSCo Depageencodingd:\work>
If you need to use more powerful features such as the IDE, you can install MonoDevelop through the sudo apt-get install MonoDevelop, an integrated development environment that uses C # and other. NET languages.
MonoDevelop supports project files in the following four formats:
- MonoDevelop 1.0
- MSBuild (Visual Studio 2005)
- MSBuild (Visual Studio 2008)
- MSBuild (Visual Studio 2010)
This can be set in "Options, load/save" In the Options dialog box that pops up after clicking the "Edit-Preferences" menu item, as shown in:
If you want to practice Agile software development and test-driven development, you must use the sudo apt-get install monodevelop-nunit command to install the NUnit plugin. You can then create a new C # NUnit project, as shown in:
Then, click on the "Project-and Options" menu item, which can be set in the "Project Options" dialog box that pops up, for example, I prefer to set tab width to 2 spaces, and convert tabs to spaces, as shown in:
Then you can develop the C # program. Click the "Run unit Tests" menu item to run the unit test, as shown in:
Copyright NOTICE: This article for Bo Master http://www.zuiniusn.com original article, without Bo Master permission not reproduced.
A brief talk on Linux C # development environment