IanelGreenleaf
IanelGreenleaf

Reputation: 53

WinForms Application window closes immediately on open in OSX

I've been developing WinForms applications in C# for Windows for years.

Today I tried to port a very simple project of mine over but whenever the application starts the main window opens and immediately closes. I broke it down to just a simple form.

public partial class TestForm : Form
{
     public TestForm()
     {
         InitializeComponent();            
     }
}

with a main like so:

[STAThread]
static void Main()
{
    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    Application.Run(new TestForm());
}

Anyway as soon as I run the application the Window flashes open and immediately closes and of course closing the app. I'm using Mono 3.1 and Xamarin Studio 5.5.3. Any thoughts?

Upvotes: 0

Views: 333

Answers (1)

IanelGreenleaf
IanelGreenleaf

Reputation: 53

Thanks to Alexander's comment the answer to the post: MAC: Mono Helloworld example was what I needed. It is apparently a bug in Mono MDK 3.1.0. Downloading and installing the linked update from dropbox fixed it!

Thanks all!

Upvotes: 1

Related Questions