title: mono - winforms not working properly with f#
body: <p>I have successfully installed MonoDevelop with the F# bindings (under Linux Arch). </p>
  
  <p>If I try a simple HelloWorld with winforms, I get this strange behavior: the program compiles and builds successfully, but a moment after the window is loaded it just closes itself and the program returns with no error messages. </p>
  
  <p>I checked the logs and it seems no error is thrown (except from the one discussed here: <a href="https://stackoverflow.com/questions/23199699/glib-critical-source-id-xxx-was-not-found-when-attempting-to-remove-it">GLib-CRITICAL **: Source ID XXX was not found when attempting to remove it</a>, which anyway seems unrelated).</p>
  
  <p>The code for the program:</p>
  
  <pre><code>open System.Drawing
  open System.Windows.Forms
  
  [&lt;EntryPoint&gt;]
  let main argv = 
      let form = new Form(TopMost = true, Text = "Hello World")
      form.Show()
      0 // return an integer exit code
  </code></pre>
  
  <p>If I try to run it through the interactive console, the window is sort of freezed: I can move it around, but I can't close it (have to shut down monodevelop in order to do so).</p>
  
  <p>I also tried to compile it via terminal, using:</p>
  
  <pre><code>fsharpc Program.fs -pkg:dotnet.dll
  mono Program.exe
  </code></pre>
  
  <p>but it behaves the same way as if I was running through MonoDevelop (window opens then shuts down). 
  Other than that F# seems to work fine, I can run console programs without any problem.</p>
  
  <p>I also tried to run a simple HelloWorld program with C# in MonoDevelop, and it just works fine.</p>
  
  <p>Any tips?</p>