title: Running .NET 4 application with Mono
body: <p>I'm trying to run a .NET exe on a Ubuntu machine (I installed the package <code>mono-complete</code>), so far with no luck. The application is compiled with Visual C# Express 2010 under .NET 4 (Client Profile).</p>
  
  <p>I try executing the program with the following command:</p>
  
  <pre><code>mono application.exe
  </code></pre>
  
  <p>However, I get the following error:</p>
  
  <blockquote>
    <p>WARNING: The runtime version supported
    by this application is unavailable.
    Using default runtime: v1.1.4322</p>
    
    <p>** (application.exe:5586): WARNING **: Missing method
    System.Windows.Forms.Application::SetCompatibleTextRenderingDefault(bool)
    in assembly
    /usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll,
    referenced in assembly
    /media/disk/application.exe</p>
    
    <p>Unhandled Exception:
    System.MissingMethodException: Method
    not found:
    'System.Windows.Forms.Application.SetCompatibleTextRenderingDefault'.</p>
  </blockquote>
  
  <p>It's suppose to be using .NET 4, not 1, but I don't know how to set it. I tried</p>
  
  <pre><code>mono --runtime=4.0.30319.1 application.exe
  </code></pre>
  
  <p>But that didn't work either.</p>
  
  <p>Any help would be appreciated.</p>