Mono Support
Mono framework is an alternative framework for running .NET applications on both Windows and Unix-based platforms.
For more information refer to the Mono official site.
Supported Build Runners
TeamCity supports running .NET builds using NAnt and MSBuild runners under Mono framework as well as under .NET Frameworks. (MSBuild as xbuild in Mono).
NuGet runners support Linux and macOS when Mono is installed on the agent. Note that only NuGet CLI 3.2+ on Mono 4.4.2+ is supported.
Tests reporting tasks are also supported under Mono.
Mono Platform Detection
When a build agent starts, it detects a Mono installation automatically.
On each platform, Mono detection is compatible with NAnt one. See NAnt.exe.config for frameworks detection on NAnt.
Agent Properties
When Mono is detected automatically on the agent side, the following properties are set:
Mono — path to the mono executable (Mono JIT)
MonoVersion — Mono version
MonoX.Z — set to
MONO_ROOT/lib/mono/X.Zif existsMonoX.Z_x64 — set to
MONO_ROOT/lib/mono/X.Zif exists and Mono architecture is x64MonoX.Z_x86 — set to
MONO_ROOT/lib/mono/X.Zif exists and Mono architecture is x86
If the Mono installation cannot be detected automatically (for example, you have installed Mono framework into a custom directory), you can make these properties available to build runners by setting them manually in the agent configuration file.
Windows Specifics
Automatic detection of Mono framework under Windows has the following specifics:
The Mono version is read from
HKLM\SOFTWARE\Novell\Mono\DefaultCLR.The Frameworks paths are extracted from
HKLM\SOFTWARE\Novell\Mono\%MonoVersion%.The platform architecture is detected by analyzing
mono.exe.
macOS Specifics
The framework is detected automatically from
/Library/Frameworks/Mono.framework/Versions.The highest version is selected.
The frameworks path are extracted from
/Library/Frameworks/Mono.framework/Versions/%MonoVersion%/lib/mono.The platform architecture is fixed to x86 as Mono official builds support only X86.
Custom Linux/Unix Specifics
Automatic detection of Mono framework under Unix has the following specifics:
Mono version is read from
pkg-config --modversion mono.The frameworks paths are extracted from
pkg-config --variable=prefix monoandpkg-config --variable=libdir mono.The platform architecture is detected by analyzing the
PREFIX/bin/monoexecutable. You can force Mono to be detected from a custom location by adding thePREFIX/bindirectory to the beginning of thePATHand updatingPKG_CONFIG_PATH(described inpkg-config(1)) withPREFIX/lib/pkgconfig.