Please ensure that Yum is installed on your system. You can download the latest version of Mono by adding the QSECOFR Yum repository. Mono for IBM i installed through Yum requires IBM i 7.2 with technical refreshes on POWER6 or newer.
After adding the repository, you can run yum install mono-complete to install Mono, base libraries, development tools for Mono, and any required dependencies. Optionally, these extra packages can be installed to provide additional functionality:
yum install mono-basic
: Visual Basic runtime supportyum install xsp
: ASP.NET Web Forms supportyum install libgdiplus0
: System.Drawing runtime supportRPM packages for AIX are not yet built.
New pages are not being built for this anymore. You will be running outdated, unsupported software. Caveat emptor.
You can download a Mono savefile for IBM i or tarball for AIX from the GitHub mirror. This distribution includes some resources to use to get started with Mono. At least AIX 6.1 Technology Level 9 or IBM i 7.1 with all technology refreshes and PTFs installed on a POWER4 or newer is required to use Mono. Before installing, please read the README for instructions on IBM i.
Untar the installation tarball to the root directory.
Please read the documentation in the README for installation instructions.
See the wiki page for how to do this.
A simple "Hello World" application's source code is included with the classic tarball/savefile distribution. Alternatively, you can place this text file somewhere on the IFS. You can use this to prove the functionality of the runtime and compiler.
class test { public static void Main() { System.Console.WriteLine("Hello world!"); } }
Log into your system and access the Unix shell; AIX users will log in normally, but i users will need to log in via SSH or run CALL QP2TERM
on the 5250. At the shell, enter /QOpenSys/pkgs/bin/mcs -out:hello.exe /path/to/the/file
(If using the old distribution, mcs
is installed in /opt/mono/bin
, and the sample file as /opt/mono/samples/hello.cs
.) at your terminal to compile the hello world program. (You can inspect the source code of the file if you wish.) A "hello.exe" file will be created in the current directory. To run this, enter /QOpenSys/pkgs/bin/mono hello.exe
(Again, using the old distribution, mono
is in /opt/mono/bin/mono
. You should see a message saying "Hello from Mono for IBM i!" - your midrange is now running .NET code! Try copying the executable to your Windows computer and run it from there.
You can take programs written with Visual Studio and run them on your POWER system. Just copy the binary files over and run them with Mono.
Note that there may be compatibility problems: your program calls into BCL classes Mono may not support, your program calls into Windows-only native code, your program makes assumptions about filesystem behaviour not valid on AIX or the IBM i Integrated File System, or triggers a bug in the Mono runtime, PowerPC JIT, or AIX/PASE support code. Consider reading up or talking in one of the community groups or filing an issue on GitHub if you run into issues or just want to talk about the port.
Contributions are welcome! We work with upstream Mono, so almost all our patches are in their source tree; submitting pull requests to upsream should be fine. If you want to work with us on midrange-specific issues, please get in touch or ping one of us on an issue.