[Mono-list] Which distribution is used when...

Jonathan Pryor jonpryor at vt.edu
Sat Oct 13 15:47:04 EDT 2007

On Fri, 2007-10-12 at 13:12 -0700, Charlie Poole wrote:
> use  --runtime=VERSION to select the runtime
> for example, to run under the 2.0 profile, specify
>   --runtime=v2.0.50727
> The weird argument format is inherited from .NET, which uses it in the
> COMPLUS_VERSION environment variable.

If you don't specify --runtime, you get whichever runtime the program
was compiled against -- if you use mcs or CSC from .NET 1.0, you'll
implicitly get a 1.0 runtime, and if you use gmcs or CSC from .NET 2.0,
you'll implicitly get a 2.0 runtime.

Mono's --runtime argument is largely to allow you to override the
default specified in the assembly header.

.NET also uses the program header to determine which runtime to use --
if you have *both* .NET 1.0 and .NET 2.0 installed, then the assembly
header will be read to determine which runtime to use.  If you only have
one version of .NET installed, then that version will be used to run
your app, which *can* result in an exception (e.g. running a 2.0 app
under a 1.0 runtime won't work) or in imperfect compatibility (e.g.
running a 1.0 app under a 2.0 runtime, as the behavior of some methods

 - Jon

More information about the Mono-list mailing list