[Mono-devel-list] [PATCH] Added Mono.Runtime.GetVersion()

Ben Maurer bmaurer at ximian.com
Sat Jun 4 10:41:15 EDT 2005


On Sat, 2005-06-04 at 16:30 +0200, Kornél Pál wrote:
> Hi,
> 
> This patch adds a new internal static GetVersion() method to the internal
> class Mono.Runtime in mscorlib.dll.
> 
> I created this funtion because there is no way to obtain the version of Mono
> runtime programmatically altought I think it is necessary.
> 
> It is internal to preserve compatibility with .NET Framework but can be
> called using reflection or using the hack that you create your own
> Mono.Runtime.GetVersion() method in your assembly but it is not recommended.
> 
> configure.in stuff is from the patch Duncan Mak in bug #39264.


+MAJOR_VERSION=1
+MINOR_VERSION=1
+BUILD_VERSION=7
+REVISION_VERSION=99
+VERSION=$MAJOR_VERSION.$MINOR_VERSION.$BUILD_VERSION.$REVISION_VERSION

Build system wise, this is a pain in the ass for me. If we have this
patch, the version should be specified as it normally is, and you should
gather the version number by parsing that string.

(the reason here is that I need to be able to make a svn snapshot and
easily change it so that there is a revision number based version at the
end. However, I can't know if the "real version" is 1.1.7 or 1.1.7.99.
Also, this totally restricts the version format to having 4 parts).



Btw, if we do this at all, lets also work on killing the horrible
version bump procedure we have today. Right now, you need to bump the
number of mcs, ilasm, etc.

-- Ben




More information about the Mono-devel-list mailing list