Common Intermediate Language/Getting started

Installation
To compile CIL code, you'll need a program called ilasm, which comes in .NET Framework SDK installations.

There are two frameworks available: Microsoft's and Mono's.

Microsoft
This is a Windows-only framework and can be downloaded from Microsoft's .NET Framework Developer Center. The default installation path is, and the framework and ilasm will be placed in a folder relating to the version installed.

for version 1.0

for version 1.1

for version 2.0

for version 3.0

for version 3.5

for version 4.0+

A terminal, such as command prompt, can then execute ilasm from one of these folders. So, if version 3.0 is installed:

Mono
This is a cross-platform framework and can be downloaded from the Mono website.

Windows and Mac
Installers are available on the website. On Window, the default installation path is.

Linux
Mono is available through package managers:


 * Debian, Ubuntu, and derivatives


 * CentOS 7, Fedora 19 (and later), and derivatives

After installation, a terminal, such as command prompt, can execute ilasm:

Hello, World!
Below is the code for a simple "Hello, World!" program. Any text editor can be used to write CIL.

First, save the following code to a file called. Then, compile the code using ilasm:. This will create an executable file called.

If you're on Windows, just enter  to run the file. However, on other platforms, you'll need to use the command  to run it.

should be outputted. You're done!