How to determine Mono version of Unity ?

Hello commUnity,

I am wandering how to surely get the Mono Version for a given Unity3D application ?

Dynamically you only can get that :

$INSTALLPATH\Unity350f5\Editor\Data\Mono\bin\mono.exe" -V
Mono JIT compiler version 2.0 (Visual Studio built mono)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
        TLS:           normal
        GC:            Included Boehm (with typed GC)
        SIGSEGV:       normal
        Notification:  Thread + polling
        Architecture:  x86
        Disabled:      none

But according to this post, I only get that information :

Unity 3.2 uses a mono 2.6 (slightly
customized with some bug fixes of
ours).

So how can we have more precisions on that version and on the "slightly customized " ?
(I need these precisions because I think I’m lacking System.Threading.Tasks from this)

Here you go (with thanks to the helpful Stack Overflow user who answer my similar question over there):

Type type = Type.GetType("Mono.Runtime");
if (type != null)
{                                          
    MethodInfo displayName = type.GetMethod("GetDisplayName", BindingFlags.NonPublic | BindingFlags.Static);
    if (displayName != null)                   
        Debug.Log(displayName.Invoke(null, null)); 
}

Well, I found a more precise solution now (the upper one gives only 2.0 as a result).

Try this line of command:

...\Unity\Editor\Data\Mono\bin>monop2 --runtime-version mono.exe

For Unity 4.5.1f3, I obtained “runtime version: 2.0.50727.1433”

We’re still quite in the past, aren’t we ?

Running

monop --runtime-version mono.exe

returns

runtime version: 4.0.30319.17020

Good Day,

Just ran this against Unity Version 5.6.0f3 and it reports as follows:

> monop --runtime-version mono.exe
runtime version: 2.0.50727.1433

and in the editor, using the method described by @Ghopper21 it reports the following:

2.0 (Visual Studio built mono)
UnityEngine.Debug:Log(Object)

Also ran against Version 2017.1.0b3, the current beta on their site using the same method as above with the same versions reported.