- Home /
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)
Ok it kind of puts me in the right direction, as I get the same error as with implementing a.NET 4.0 dll. I know Unity should be able to run a .NET 4.0 like mono implementation, at least nowadays. However, I apparently have jit compier 2.0 ins$$anonymous$$d of the current version ( editor\data\mono\bin\mono -V --> jit compire v 2.0). How to fix?
This is not a answer to the question, please post your own question if you have one
Answer by Ghopper21 · Oct 17, 2012 at 12:01 PM
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));
}
You'll need.
using System.Reflection; to make it work.using System;
But I used the code above on Unity 3.5.4 and 4.5 .Both told me the version is 2.0,not 2.6.
Answer by Cyrille-Paulhiac · Jul 08, 2014 at 10:11 PM
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 ?
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.
Answer by wvdv · Sep 24, 2015 at 04:18 PM
Running
monop --runtime-version mono.exe
returns
runtime version: 4.0.30319.17020
Is this current? I need to know when googling on stack overflow, which version of C# answers to actually read.
I'm on OS X so I can't run this myself.
This is listed as the $$anonymous$$icrosoft .Net version under Runtime
Runtime:
$$anonymous$$icrosoft .NET 4.0.30319.34209
GT$$anonymous$$ 2.24.20
GT$$anonymous$$# (2.12.0.0)
(Check the About tab in $$anonymous$$ono, being the easiest way to find versions) All assemblies are listed under the Show Loaded Assemblies button.
Your answer
![](https://koobas.hobune.stream/wayback/20220613072115im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Which version of mono used in Unity 3.2? 2 Answers
how to connect to mssql in unity for hololesn (Build Setting Error) 0 Answers
What version of Mono does Unity 5 use? 0 Answers
`System.IO.File' does not contain a definition for `AppendText'? 1 Answer
Why do Two Instances of MonoDevelop Open when I double-click a CS file in Inspector? 0 Answers