[Mono-list] How to detect which version of Mono a library is compiled with?

IBBoard ibboard at gmail.com
Fri May 11 18:54:08 UTC 2012


Okay, so my other topic is getting bogged down and missing the point. 
Hopefully this will keep the important part separate from the cruft.

For reasons that won't be discussed here, I have a .Net 2.0 app that 
uses GTK#. This is fine on openSUSE using 2.10.6, but on Ubuntu 12.04 it 
crashes out because they compiled 2.10.8 and GTK# with the .Net 4.0 
profile. If I force the .Net 4.0 profile, it runs without a problem.

What I have at the moment is a "run" script that uses lsb_release to 
look for "Ubuntu" releases greater than "12", and if it finds it then it 
adds the "--runtime" switch. That is obviously an ugly hack, as 
off-shoots of Ubuntu (or other distros) could also end up with the same 
problem, but not get picked up because they're not "Ubuntu" or they're 
using a different versioning scheme.

What I want is a less hack-ish run script (currently using Bash). The 
proper way to do it is to check for features rather than string matching 
and version checking (which caused lots of JavaScript issues with people 
doing IE version checks badly). Is there a way to probe the profile that 
a Mono library was compiled with from Bash, without the ...-dev package 
being installed?

Thanks,

IBBoard


More information about the Mono-list mailing list