I want to determine the revision (how to call properly it in Git?) from which current Mono runtime was built and installed.
$ dmcs --version
Mono C# compiler version 2.9.0.0
but it's definitely insufficient.
XSP/ASP.NET error page gives more information:
Version information: Mono Runtime Version: 2.8.1 (master/cdf1247 Sat Sep 4 01:22:04 MSD 2010); ASP.NET Version: 4.0.30319.1
but it seems to be a dirty hack to me.
How to do it properly?
If you're looking for the mono runtime version; there is an internal Mono.Runtime class in mscorlib, it has a static method GetDisplayName which should return a string with current runtime version. This method is private but still can be accessed via reflection. I wrote a small script to test this, check if would work for you:
on my system this returns:
hope this helps, regards
mono -V
will output the version string, including source code revision.