Bug 15728 - mono app that uses Gtk# wont run on windows if installing full Mono #Gtk# 3.2.3 but do work if installing "Gtk# for .NET" from 2.10.x
Summary: mono app that uses Gtk# wont run on windows if installing full Mono #Gtk# 3.2...
Alias: None
Product: Gtk#
Classification: Mono
Component: gtk-sharp ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2013-10-26 16:15 UTC by Sean
Modified: 2013-10-26 18:45 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Sean 2013-10-26 16:15:29 UTC
The Nu Tech virtual keypad ad2usbgui_mono_2_7.zip failes to start on Windows with full Mono+Gtk# install but runs with 2.10.x Gtk# only install.

    App Screenshot:
        Nu Tech Virtual Keypad @ http://www.mono-project.com/Screenshots
    Our install docs and download links:
    Direct download:

 Our instructions have been to have people install Gtk# only. This has been the only way it has worked. If they installed "Mono for Windows, Gtk#, and XSP" from 2.10.x or 3.2.3 the Virtual keypad will not start and will cause an exception

 The applications own internal exception handler is never called so I do not get a C# stack dump. The app never seems to even start C# fully.

  Currently no option exists for 3.2.3 to only install Gtk# so I have to have people install the older 2.10.x Gtk# only package after they remove 3.2.3 when this is done everything works fine.

 Thanks for any input on this issue.
  Sean Mathews
Comment 1 Mikayla Hutchinson [MSFT] 2013-10-26 18:18:27 UTC
The GTK# bundled with Mono is only used when you run the app with Mono, i.e. "mono.exe yourapp.exe". If you are just trying to launch your exe directly, then Windows will try to run it with .NET, which will fail unless you have GTK# installed for .NET.

I would strongly recommend you just use GTK# for .NET. The latest build is 2.12.22: http://download.xamarin.com/GTKforWindows/Windows/gtk-sharp-2.12.22.msi
Comment 2 Sean 2013-10-26 18:29:58 UTC
 This is what I have instructed people to do on our forums. The problem is that on the Mono website when you select the latest Mono 3.2.3 it no longer gives you an option to download just Gtk#. I could update my install docs to hard code a link to http://download.xamarin.com/GTKforWindows/Windows/gtk-sharp-2.12.22.msi if that is preferred.

My existing instructions.
First install GTK# from this URL
Select your operating system from the given choices - example: Select windows. A new set of links will be presented - from here, download the Gtk# for .NET.

 This has caused a few problems in the past where people downlaoded 2.10.x full mono with gtk# so maybe a better option is to just provide a full link to the Gtk# installer is a better idea.
Comment 3 Sean 2013-10-26 18:36:55 UTC
I updated my install docs page for now I will just hard code the url for Gtk# 2.12.22 and as new versions come out I will have to just come back and update the link.

Thanks for the input.

 Sean M
Comment 4 Mikayla Hutchinson [MSFT] 2013-10-26 18:41:30 UTC
Ah, not sure why it's missing from the Mono website, that seems like an oversight in the release.

You should also be able to also find a link to the latest version on http://monodevelop.com/Download, since MonoDevelop (Xamarin Studio) on Windows uses GTK# for .NET, not Mono.
Comment 5 Mikayla Hutchinson [MSFT] 2013-10-26 18:45:15 UTC
FWIW, Mono for Windows is really intended for people testing their code builds with Mono, or with unusual situations where they can't install .NET. In general, we'd recommend using .NET on Windows, since it's better optimized/tuned for Windows, and most users have it installed already. A consequence of this is that the GTK# build bundled with Mono for Windows is not as up to date or well tested as GTK# for .NET.