If I want to run the application monodevelop, I need to chdir to /usr/lib/monodevelop/Bin and then execute ./MonoDevelop.exe. This is the same for all other Mono applications such as banshee, tomboy, etc.

If I attempt to run the Mono applications from another location by simply running monodevelop, or even from their own directory, I get TypeInitializationExceptions like this:

behrooz@behrooz:/usr/lib/monodevelop/bin$ monodevelop
FATAL ERROR [2012-05-04 11:24:39Z]: MonoDevelop failed to start. Some
of the assemblies required to run MonoDevelop (for example gtk-sharp,
gnome-sharp or gtkhtml-sharp) may not be properly installed in the
GAC. System.TypeInitializationException: An exception was thrown by
the type initializer for Gtk.Application --->
System.EntryPointNotFoundException: glibsharp_g_thread_supported at
(wrapper managed-to-native) GLib.Thread:glibsharp_g_thread_supported
() at GLib.Thread.get_Supported () [0x00000] in :0
at Gtk.Application..cctor () [0x00000] in :0 ---
End of inner exception stack trace --- at
MonoDevelop.Ide.IdeStartup.Run (MonoDevelop.Ide.MonoDevelopOptions
options) [0x0007e] in
at MonoDevelop.Ide.IdeStartup.Main (System.String[] args) [0x0004f] in

Why is that?

I have tried reinstalling all Mono, Wine, GTK, Glib, X, Gnome packages.

apt-get --purge --reinstall install $(dpkg --get-selections| grep mono |grep install |grep -v deinstall |awk'{print $1}')

I also tried starce on "open" and got nothing by myself

System Configuration:
- Debian 6.0-updates 64 bit
- Kernel 3.2.0-2, 3.2.0-1, 3.1 and 3 EDIT: not a kernel thing - Gnome 3.4 EDIT:but a gnome thing - Mono 2.10.5
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)

update: with upgrading to the new monodevelop 3.0.2 and latest mono, I can run monodevelop with command "monodevelop" in terminal,no chdir.but gnome-shell cannot run it.

Finally found it:
as root:

 cd /usr/local/
 find | grep mono|xargs rm -rf
 # Use with caution/some applications may get messed up(stellarium has MONOchrome images...)
| improve this question | | | | |
  • Please tell me you don't really have to type "Monodevelop.exe". At this point, it's pretty obvious that "file extensions" were a terrible mistake. There's no reason to perpetuate them beyond Windows. – Bruce Ediger May 4 '12 at 13:12
  • @BruceEdiger:Sorry, but this is real. – Behrooz May 4 '12 at 19:53

It looks like you've built and installed monodevelop from source - did you do the same for the dependencies like gtksharp? Since banshee and tomboy are broken, it sounds like you have a dependency shared between the broken programs, and that's an obvious candidate. Do CLI mono apps work?

From the MonoDevelop build documentation:

We strongly recommend you install everything from packages if possible. If not you, you should use a Parallel Mono Environment. Do not install anything to /usr or /usr/local unless you completely understand the implications of doing do.

If the other mono applications will only run from the installed monodevelop tree, and reinstalling packages hasn't helped, you might have a mess of extra stuff floating around that the source install has added which is interfering with mono finding its libraries, possibly with hardcoded paths into the monodevelop install.

My Debian-fu is not strong, but there should be a way of identifying files in /usr that dpkg doesn't know about, that might be a place to start.

| improve this answer | | | | |
  • Wow, It's true, But how on earth could it have this effect after 6 month? – Behrooz May 5 '12 at 19:55
  • @Behrooz I'm guessing here, but if it loaded something into a shared location that mono uses, it could hang around until it's cleaned up manually. Something like the GAC or the pkg-config stuff it uses when building could affect other software, especially if that was also built from source. – user18419 May 5 '12 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.