[Mono-list] Build once run on multiple platforms

Jonathan Pryor jonpryor@vt.edu
06 Mar 2003 21:24:59 -0500


There are two answers, the short term answer and the long term answer.

The short term answer is that this isn't a problem, for .NET->Mono usage
scenarios.  Mono doesn't support strong names at the moment, nor does it
support shared assemblies and the GAC (Global Assembly Cache).  The
benefit to all this is that you can take your csc-compiled code which
uses the System.Data strong name and it'll work under Mono without any
problems (unless you hit an area that hasn't been implemented yet.)

The opposite direction "breaks" things: you can't compile your Mono app
against Mono's System.Data and have it magically use .NET's System.Data
strong-name assembly under Windows.  .NET expects a non-shared assembly,
so it'll look for a System.Data.dll in the program's AppBasePath
directory, *not* the System.Data shared assembly.  You could copy Mono's
System.Data.dll into the program's directory and things should work, but
that's probably not quite what you want.

The long term answer is unknown.  Long-term Mono should support
strong-names, shared assemblies, and the GAC, but in doing so will
probably need to provide a mapping mechanism so that Mono can run
.NET-compiled programs using the Mono-native libraries, as appropriate.

Alternatively we could argue that all ECMA-standardized assemblies
should have the same assembly name, public key, and version (these are
all part of the ECMA-335 standard for the standardized types), so there
shouldn't be any interoperability problems for the standardized types...

...Then realize that most types aren't standardized (System.Data,
System.Windows.Forms, etc.), so a mapping mechanism is probably
necessary.

There are still a lot unanswered issues for the long-term solution.

 - Jon

On Wed, 2003-03-05 at 08:47, Graham Allwood wrote:
> Can I ask a general question? More clarification I suppose.
> 
>  
> 
> It not going to be possible to run a program compiled with the MS .NET
> implementation (using Windows) on MONO is it? I mean, when I compile
> with either CSC or MCS and add references to say System.Data (or
> whatever) then this will add a reference to a strong named type. So
> when I compile with MS.NET, the strong name of the MONO System.Data
> assembly is not going to match?
> 
>  
> 
> So is the idea that when I compile under windows I use the MONO
> libraries if I want my exe to run on Unix because things like
> System.Data will have the same strong name on both machines?
> 
>  
> 
> I thinking more towards System.Windows.Forms, but I didn't know if
> this would complicate things.
> 
>  
> 
> Regards
> 
>  
> 
> Graham Allwood
> 
>  
> 
>