[Mono-list] Building c# projects on Linux

Edward Ned Harvey (mono) edward.harvey.mono at clevertrove.com
Tue Dec 3 13:23:54 UTC 2013


> From: mono-list-bounces at lists.ximian.com [mailto:mono-list-
> bounces at lists.ximian.com] On Behalf Of v0idnull
> 
> #1: One thing that was not clear to me, is whether or not I can use Mono to
> build windows projects on linux, with the resulting build being usable on
> Windows without installing Mono on Windows. My build machine is a Jenkins

When you compile to exe or dll, it's actually just compiled byte code that's platform agnostic.  You can compile the exe or dll on windows or mono, and then copy the exe or dll over to another platform and simply run it.  (double click the exe in windows, and it runs on .NET, or type "mono myfile.exe" to run it on linux/unix.

The byte code is executed on a JIT compiler that compiles to machine instructions specific on your machine.  The machine code gets stored somewhere (but I'm not sure where) so upon repeat runs, it doesn't need to be repeat compiled.


> #2: I see there are some problems with Mono and WiX. Has anyone made a
> project using WiX and get to build successfully with Mono? I am somewhat
> new
> to windows development in general so if there are alternatives to WiX that
> are more mono friendly, I am very much open to any ideas. Again, the

Isn't WiX the installer packager, windows specific?  I would assume you would bundle your application for linux/unix using a linux/unix specific package installer, and use WiX for the windows installer (if at all).

The code and the compiled byte-code binaries should be platform agnostic, but the interface, gui, filesystem, installer, etc, are all going to be platform specific. 

Also the performance will vary greatly if you compare .NET against mono.  Because they're different implementations of the same API, and they have different optimizations and so on.  I recently benchmarked all the cryptographic functions - every symmetric and asymmetric implemention that's built into .NET and mono - every variant, Managed, CNG, CryptoServiceProvider, and I found, some of them were faster on windows, some of them were faster on mono.  I was only testing windows 7 & mono mac...  Didn't test other versions of windows, nor linux etc.  I'm sure if I had tested those, I would discover even more variability.


More information about the Mono-list mailing list