Using the local C# installation
Ximian's Mono C# compiler and runtime
have been installed locally for use by CS538 students.
Here are instructions for using the installation from a Solaris workstation
(the Novas) or a Linux workstation (the Tuxes) only.
If you have problems with the C# installation, please send mail to Manoj Plakal <email@example.com>
(your CS538 TA)
- The installation resides in this directory:
- Add the `bin' subdirectory of the installation to your PATH environment
variable. The `bin' subdirectory contains the compiler and runtime executables.
Adding them to your PATH will make them accessible without having to type
in the full path each time you want to run them. Here's how to do it depending
on the Unix shell you use (tcsh is the default shell in case you don't know
which shell you're using):
For tcsh or csh, you can add this line to your ~/.cshrc file to set the PATH
every time you start a new shell:
setenv PATH /u/p/l/plakal/courses/cs538/spring03/cs/mono/bin:$PATHFor bash, you can add this line to your ~/.bashrc file to set
the PATH every time you start a new shell:
- The name of the C# compiler is `mcs' (Mono C# Compiler). So if you
have a C# program in a file called `foo.cs', then executing this:
will produce a C# executable called `foo.exe' in the same directory as `foo.cs'.
For information on options you can give the compiler, run:
- C# executables cannot be executed directly, they need to be interpreted
by a C# interpreter. The name of the interpreter is `mint' (Mono interpreter).
So if you have a C# executable in a file called `foo.exe', then executing
will execute foo.exe. For information on options you can give the interpreter,
- Some sample C# programs have been placed in this directory:
/u/p/l/plakal/courses/cs538/spring03/cs/mono/samplesThese are small test cases and benchmarks taken from the Mono
source distribution. For more sample programs, see the various C# introduction
and tutorial links on the CS538 C# page.