[Mono-list] Why do .net compiled apps run without a black dos prompt, and mono apps do?

Robert Jordan robertj at gmx.net
Tue Jun 26 04:35:11 EDT 2007


Jacob Rhoden wrote:
> Hi Guys, Not sure if this list is active, I just subscribed, anyways
> quick question.
> 
> Why do .net compiled apps run without a black dos prompt, and mono apps do?
> 
> Long version:
> 1) I downloaded a simple example app to show an icon in the system tray.
> I just dobule click on the executable and it works (runs under .NET not
> mono).
> 2) then I compiled using mono, and then double click on the executable,
> and a Black dos prompt opens and stays open during the life of the
> application.
> 
> How do I compile so that I dont get the dos prompt? I tried compiling in
> two different ways. I don't know the difference.
> 
>   mcs /r:System.Windows.Forms.dll /r:System.Drawing.dll  SystemTrayApp.cs
>   mcs -pkg:dotnet SystemTrayApp.cs

1) compile with -target:winexe

    mcs -target:winexe -pkg:dotnet SystemTrayApp.cs

2) launch the application using monow

    monow SystemTrayApp.exe

Robert



More information about the Mono-list mailing list