Bug 17173 - [XS] Could not load Xamarin.MacDev.dll or its dependancies error while trying to archive a project using mdtool archive command
Summary: [XS] Could not load Xamarin.MacDev.dll or its dependancies error while trying...
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Add-ins ()
Version: 4.2.x
Hardware: PC Mac OS
: High major
Target Milestone: 4.2.4 (from master)
Assignee: Rodrigo Kumpera
URL:
Depends on:
Blocks:
 
Reported: 2014-01-10 12:04 UTC by GouriKumari
Modified: 2014-02-10 16:29 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:
VERIFIED FIXED

Comment 2 askgl 2014-01-11 19:35:33 UTC
I can confirm this bug. I'm using following command to get this error.

mdtool (mdtool -v build --configuration:"Release" Foobar.sln)
Comment 5 Øystein Krog 2014-01-15 07:21:45 UTC
We see this on our build server, let me know if you need any more info.
Here is a part of the log (there is much more):

[10:58:28][Step 8/11] Starting: /Applications/buildAgent2/temp/agentTmp/custom_script2746030202077564197
[10:58:28][Step 8/11] in directory: /Applications/buildAgent2/work/28b15ce243d7db6b/Mobile/SwingCatalyst
[10:58:29][Step 8/11] ERROR [2014-01-15 10:58:29Z]: Add-in error (MonoDevelop.MacDev,4.3.1): Add-in could not be loaded
[10:58:29][Step 8/11] System.BadImageFormatException: Could not load file or assembly '/Applications/Xamarin Studio.app/Contents/MacOS/lib/monodevelop/AddIns/Xamarin.Ide/Xamarin.MacDev.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
[10:58:29][Step 8/11] File name: '/Applications/Xamarin Studio.app/Contents/MacOS/lib/monodevelop/AddIns/Xamarin.Ide/Xamarin.MacDev.dll'
[10:58:29][Step 8/11] at (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom (string,bool)
[10:58:29][Step 8/11] at System.Reflection.Assembly.LoadFrom (System.String assemblyFile) [0x00000] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System.Reflection/Assembly.cs:478
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.LoadModule (Mono.Addins.Description.ModuleDescription module, System.Collections.ArrayList asmList) [0x000a1] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:644
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.EnsureAssembliesLoaded () [0x00020] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:683
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.CheckAddinDependencies (Mono.Addins.Description.ModuleDescription module, Boolean forceLoadAssemblies) [0x00052] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:665
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.EnsureAssembliesLoaded () [0x00012] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:682
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.GetType (System.String typeName, Boolean throwIfNotFound) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:319
[10:58:29][Step 8/11] at Mono.Addins.AddinEngine.InsertAddin (IProgressStatus statusMonitor, Mono.Addins.Addin iad) [0x0006f] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/AddinEngine.cs:529
[10:58:29][Step 8/11] ERROR [2014-01-15 10:58:29Z]: Could not load framework 'IPhone'
[10:58:29][Step 8/11] System.InvalidOperationException: Add-in 'MonoDevelop.IPhone,4.3.1' could not be loaded.
[10:58:29][Step 8/11] at Mono.Addins.ExtensionNode.get_Addin () [0x0009f] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/ExtensionNode.cs:157
[10:58:29][Step 8/11] at MonoDevelop.Core.AddIns.TargetFrameworkNode.CreateFramework () [0x0000d] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core.AddIns/TargetFrameworkNode.cs:48
[10:58:29][Step 8/11] at MonoDevelop.Core.Assemblies.SystemAssemblyService.CreateFrameworks () [0x0003c] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/SystemAssemblyService.cs:278
[10:58:29][Step 8/11] Xamarin Studio Build Tool
[10:58:29][Step 8/11] ERROR [2014-01-15 10:58:29Z]: Add-in error (): Condition 'MonoTouchInstalled' not found in current extension context.
[10:58:29][Step 8/11] ERROR [2014-01-15 10:58:29Z]: Add-in error (MonoDevelop.MonoMac,4.3.1): Add-in could not be loaded
[10:58:29][Step 8/11] System.BadImageFormatException: Could not load file or assembly '/Applications/Xamarin Studio.app/Contents/MacOS/lib/monodevelop/AddIns/Xamarin.Ide/Xamarin.MacDev.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
[10:58:29][Step 8/11] File name: '/Applications/Xamarin Studio.app/Contents/MacOS/lib/monodevelop/AddIns/Xamarin.Ide/Xamarin.MacDev.dll'
[10:58:29][Step 8/11] at (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom (string,bool)
[10:58:29][Step 8/11] at System.Reflection.Assembly.LoadFrom (System.String assemblyFile) [0x00000] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System.Reflection/Assembly.cs:478
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.LoadModule (Mono.Addins.Description.ModuleDescription module, System.Collections.ArrayList asmList) [0x000a1] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:644
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.EnsureAssembliesLoaded () [0x00020] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:683
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.CheckAddinDependencies (Mono.Addins.Description.ModuleDescription module, Boolean forceLoadAssemblies) [0x00052] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:665
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.EnsureAssembliesLoaded () [0x00012] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:682
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.CheckAddinDependencies (Mono.Addins.Description.ModuleDescription module, Boolean forceLoadAssemblies) [0x00052] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:665
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.EnsureAssembliesLoaded () [0x00012] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:682
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.GetType (System.String typeName, Boolean throwIfNotFound) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:319
[10:58:29][Step 8/11] at Mono.Addins.AddinEngine.InsertAddin (IProgressStatus statusMonitor, Mono.Addins.Addin iad) [0x0006f] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/AddinEngine.cs:529
[10:58:29][Step 8/11] ERROR [2014-01-15 10:58:29Z]: Add-in error (MonoDevelop.MonoMac,4.3.1): Error while getting object for node in path '/MonoDevelop/ProjectModel/ProjectServiceExtensions'.
[10:58:29][Step 8/11] System.BadImageFormatException: Could not load file or assembly '/Applications/Xamarin Studio.app/Contents/MacOS/lib/monodevelop/AddIns/Xamarin.Ide/Xamarin.MacDev.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
[10:58:29][Step 8/11] File name: '/Applications/Xamarin Studio.app/Contents/MacOS/lib/monodevelop/AddIns/Xamarin.Ide/Xamarin.MacDev.dll'
[10:58:29][Step 8/11] at (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom (string,bool)
[10:58:29][Step 8/11] at System.Reflection.Assembly.LoadFrom (System.String assemblyFile) [0x00000] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System.Reflection/Assembly.cs:478
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.LoadModule (Mono.Addins.Description.ModuleDescription module, System.Collections.ArrayList asmList) [0x000a1] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:644
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.EnsureAssembliesLoaded () [0x00020] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:683
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.CheckAddinDependencies (Mono.Addins.Description.ModuleDescription module, Boolean forceLoadAssemblies) [0x00052] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:665
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.EnsureAssembliesLoaded () [0x00012] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:682
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.CheckAddinDependencies (Mono.Addins.Description.ModuleDescription module, Boolean forceLoadAssemblies) [0x00052] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:665
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.EnsureAssembliesLoaded () [0x00012] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:682
[10:58:29][Step 8/11] at Mono.Addins.RuntimeAddin.GetType (System.String typeName, Boolean throwIfNotFound) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:319
[10:58:29][Step 8/11] at Mono.Addins.TypeExtensionNode.get_Type () [0x0002c] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/TypeExtensionNode.cs:104
[10:58:29][Step 8/11] at Mono.Addins.TypeExtensionNode.CreateInstance () [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/TypeExtensionNode.cs:93
[10:58:29][Step 8/11] at Mono.Addins.InstanceExtensionNode.GetInstance () [0x0000b] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/InstanceExtensionNode.cs:73
[10:58:30][Step 8/11] at Mono.Addins.InstanceExtensionNode.GetInstance (System.Type expectedType) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/InstanceExtensionNode.cs:55
[10:58:30][Step 8/11] at Mono.Addins.ExtensionNode.GetChildObjectsInternal (System.Type arrayElementType, Boolean reuseCachedInstance) [0x0005e] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.3.1-branch/bd211816/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/ExtensionNode.cs:356
Comment 6 Jeffrey Stedfast 2014-01-15 17:01:03 UTC
just committed a work-around for this to the 4.2.3 branch
Comment 8 Jeffrey Stedfast 2014-01-15 17:47:47 UTC
never mind, that fix didn't work - we need the new mono
Comment 9 GouriKumari 2014-01-17 12:26:12 UTC
Verified bug and the issue is fixed in the following environment

Issue Fixed builds: 
XS 4.2.3 git revision 5f53cb33c3fe39bbc06e7e9515e9ea3af3dbe1f5
Mono 3.2.6 ((no/9b58377)
Build Log: https://gist.github.com/GouriKumari/8b150289ef56203d6149

Issue existed in the following environment
XS 4.2.3 git revision: 8aea2e1f308b678e0d8f5c38f4306aade7c9b13a
Mono 3.2.5 stable
Build Log:https://gist.github.com/GouriKumari/fde78e9eca0b294d4dc6