Programming Course in C# ¡Free!

Compile sources with Mono Command Prompt

 Saturday, May 03, 2014 published by Exercises C#
It is the console where we can compile our sources in C#. The command we will use more frequently is 'mcs'.

If we read in the documentation the section of commands and files, find the command 'mcs'. In summary, we can see that there are 3 versions of the command:

1. The mcs compiler is used to compile C# 1.0 and parts of C# 2.0 and C# 3.0 specification.
2. The gmcs compiler is used to compile against the 2.0 and implements the complete C# 3.0 specification.
3. The smcs compiler is used to compile against the Silverlight/Moonlight profile.

Usage:
mcs/gmcs/smcs [option] [source-files]

Example: