Forum Visual Studio

mdtool build error

DelboyJayDelboyJay GBMember

Hi People,

I'm new to Xamarin Studio so apologies for the noob question but I'm completely stuck on this. Basically our solution builds perfectly in Xamarin Studio and now I need to run it from the command line so I can put it into our standard buildsystem but I appear to have missed something in the setup or configuration as it complains about the fact that it cannot find a registered GTK# installation.

I have installed Mono for windows 2.10.9 which contains GTK# 2.12.11 but I have also installed the standalone GTK# 2.12.20 because our developer says he has that installed and it is all installed on Windows Server 2012 in a VM at the moment while I test it all.

Here is the command I'm running to get it built and the eror that it responds with:

mdtool build '--configuration:Release' test_mono.sln

ERROR [2013-05-24 15:56:25Z]: Did not find registered GTK# installation
MonoDevelop Build Tool
System.TypeInitializationException: The type initializer for 'Mono.Unix.Native.Stdlib' threw an exception. ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect
format. (Exception from HRESULT: 0x8007000B)
   at Mono.Unix.Native.Stdlib.GetDefaultSignal()
   at Mono.Unix.Native.Stdlib..cctor()
   --- End of inner exception stack trace ---
   at ptr)
   at Mono.Unix.Catalog.MarshalStrings(String s1, IntPtr& p1, String s2, IntPtr& p2, String s3, IntPtr& p3)
   at Mono.Unix.Catalog.Init(String package, String localedir)
   at MonoDevelop.Core.GettextCatalog..cctor()
The type initializer for 'Mono.Unix.Native.Stdlib' threw an exception.

Any ideas what I've done wrong or overlooked?




  • mhutchmhutch USMember, Xamarin Team Xamurai

    What version are you using? It looks like mdtool is not a 32-bit exe (which it needs to be).

  • DelboyJayDelboyJay GBMember

    I'm using Xamarin Stidio 4.0.1 build 9. I am running on 64bit Windows server 2012 but xamarin studio and the mdtool I am running is installed under C:\Program Files (x86)\Xamarin Studio\bin which suggests that I have the 32 bit version.

    There appears to be only one version of Mono for Windows + GTK# and Xamarin Studio for download I don't see an option for x86 or x64 bit flavors.

  • mhutchmhutch USMember, Xamarin Team Xamurai

    Please update to Xamarin Studio 4.0.8 and try again, IIRC we fixed this since 4.0.1.

  • DelboyJayDelboyJay GBMember

    Thanks Michael I'll give that a go and report on my progress.

  • DelboyJayDelboyJay GBMember

    Hi Michael, Upgrading to V4.0.8 of Xamarin Studio fixed the problem so thanks for the feedback.

Sign In or Register to comment.