Bug 23902 - Cannot run Windows.Forms (Gtk#) application
Summary: Cannot run Windows.Forms (Gtk#) application
Status: RESOLVED DUPLICATE of bug 23553
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-10-17 11:33 UTC by Juergen.Reichert
Modified: 2014-10-20 12:10 UTC (History)
6 users (show)

Tags:
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 Developer Community or GitHub 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:
Status:
RESOLVED DUPLICATE of bug 23553

Description Juergen.Reichert 2014-10-17 11:33:39 UTC
I installed Mono MDK 3.10.0 from http://www.mono-project.com/download/  successfully.
I can create Console applications.


I can compile the "Winforms Hello World" from  http://www.mono-project.com/docs/getting-started/mono-basics/
BUT I cannot run Windows.Forms (Gtk#) applications !


Error message:
mono hello.exe 
System.EntryPointNotFoundException: GdipCreateFromContext_macosx
  at (wrapper managed-to-native) System.Drawing.GDIPlus:GdipCreateFromContext_macosx (intptr,int,int,intptr&)
  at System.Drawing.Graphics.FromHwnd (IntPtr hwnd) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.XplatUICarbon.PaintEventStart (System.Windows.Forms.Message& msg, IntPtr handle, Boolean client) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.XplatUI.PaintEventStart (System.Windows.Forms.Message& msg, IntPtr handle, Boolean client) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ContainerControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in <filename unknown>:0 

Environment: MAC: OSX 10.9.5


mono-test-install
Active Mono: /usr/bin/mono
Warning: pkg-config could not find mono installed on this system
No dotnet pkgconfig found, Windows.Forms, System.Drawing and others will not work

I've already tried with no success:
* export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/Library/Frameworks/Mono.framework/Versions/3.10.0/lib/pkgconfig/"
* sudo ln -s /Library/Frameworks/Mono.framework/Commands/pkg-config /usr/bin/pkg-config


Any help would be greatly appreciated !!!
Comment 1 Ram Chandra 2014-10-20 11:57:12 UTC
I have checked this issue and I am able to reproduce this issue.

I am following the following  doc :
"http://www.mono-project.com/docs/getting-started/mono-basics/"

I am able to create simple "Console Hello World: application but when I try to create the  "Winforms Hello World" application I am getting the following error. However application is compiled successfully.

System.EntryPointNotFoundException: GdipCreateFromContext_macosx
  at (wrapper managed-to-native) System.Drawing.GDIPlus:GdipCreateFromContext_macosx (intptr,int,int,intptr&)

Screencast: http://www.screencast.com/t/1BIlJdB3

Error Details: https://gist.github.com/saurabh360/aef295faf34e7746debf

Environment Info: 

Mac OS X 10.9.5
Mono 3.10.0 ((detached/633e444)
GTK+ 2.24.23 (Raleigh theme)
Xcode 6.0.1 (6528)
Comment 2 PJ 2014-10-20 12:10:50 UTC

*** This bug has been marked as a duplicate of bug 23553 ***