[Mono-list] mono on ubuntu 12.04 LTS

Ian Norton ian.norton-badrul at thales-esecurity.com
Tue Jan 15 18:50:17 UTC 2013


I Believe this is because the ubuntu gtk-sharp is compiled against the 
.Net 4.0 profile, IMO it should be compiled against .Net 2 so that it 
works with everything ( -sdk:2 ) but it isn't.

This is mainly I think because gtk-sharp largely predates mono defaulting to 
the .net4 profile.

Best

Ian

On Fri, Jan 11, 2013 at 10:05:06PM +0000, yuanbyu wrote:
> I am having some problem running Mono on Ubuntu.  After installing mono with:
> 
> sudo apt-get install mono-complete
> 
> I was able to run a simple hello world program.  However when I tried the
> following program:
> 
> using Gtk;
> using System;
>  
> class Hello {
>         static void Main()
>         {
>                 Application.Init ();
>                 Window window = new Window ("helloworld");
>                 window.Show();
>  
>                 Application.Run ();
>         }
> }
> 
> It failed with the following error message:
> 
> temp$ mono hello1.exe
> Missing method System.Type::op_Inequality(Type,Type) in assembly
> /usr/lib/mono/2.0/mscorlib.dll, referenced in assembly
> /usr/lib/mono/gac/gtk-sharp/2.12.0.0__35e10195dab3c99f/gtk-sharp.dll
> 
> Unhandled Exception: System.MissingMethodException: Method not found:
> 'System.Type.op_Inequality'.
>   at Gtk.Window..ctor (System.String title) [0x00000] in <filename
> unknown>:0 
>   at Hello.Main () [0x00000] in <filename unknown>:0 
> [ERROR] FATAL UNHANDLED EXCEPTION: System.MissingMethodException: Method not
> found: 'System.Type.op_Inequality'.
>   at Gtk.Window..ctor (System.String title) [0x00000] in <filename
> unknown>:0 
>   at Hello.Main () [0x00000] in <filename unknown>:0 
> temp$ mono --version
> Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-1ubuntu2.2)
> Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors.
> www.mono-project.com
> 	TLS:           __thread
> 	SIGSEGV:       altstack
> 	Notifications: epoll
> 	Architecture:  amd64
> 	Disabled:      none
> 	Misc:          softdebug 
> 	LLVM:          supported, not enabled.
> 	GC:            Included Boehm (with typed GC and Parallel Mark)
> temp$ gmcs --version
> Mono C# compiler version 2.10.8.1
> 
> Any help is greatly appreciated.
> -Yuan
> 
> 
> 
> --
> View this message in context: http://mono.1490590.n4.nabble.com/mono-on-ubuntu-12-04-LTS-tp4658092.html
> Sent from the Mono - General mailing list archive at Nabble.com.
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list


More information about the Mono-list mailing list