[Mono-list] Developing on Windows, running on Linux

jmalcolm malcolm.justin at gmail.com
Tue Apr 19 00:07:36 EDT 2011


Volodia wrote:
> 
> I'm new to Mono.
> I want to develop a Windows.Forms application on Windows under Visual
> Studio but execute on Linux.
> From the Mono documentation it’s not clear to me:
> 1) Should I reference Mono version of Winforms dlls or Microsoft .NET
> version?
> 2) Should I compile with dmcs or Microsoft csc.exe? What are the
> differences between these two compilers?
> 

About 2)...

dmcs is the Mono C# compiler that targets CLR 4 (C# 4). csc.exe is
Microsoft's C# compiler. You can use either to compile your code and the
resulting assemblies should run just fine on either Mono or .NET. It does
not matter which system you use to compile. This is of course assuming that
you have not used any libraries that Mono does not support (like Windows
Presentation Foundation, Entity Framework, Windows Workflow, etc.). That
said, most people coding on Windows would probably prefer to use csc.exe for
their builds.

One interesting difference is that dmcs is written in C# and is itself a
.NET/Mono managed executable. You can run dmcs on Windows, Linux, or Mac.
csc.exe is a native Windows executable and so will only run on Windows. This
is why Mono is able to offer a C# REPL and the C# compiler as a service in
.NET/Mono apps while Microsoft is still working towards offering these
features in .NET proper.

--
View this message in context: http://mono.1490590.n4.nabble.com/Developing-on-Windows-running-on-Linux-tp3453500p3459374.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list