Bug 549 - Cannot build project / Mono.Linker.ResolutionException
Summary: Cannot build project / Mono.Linker.ResolutionException
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 4.x
Hardware: Macintosh Mac OS
: --- blocker
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2011-08-30 16:52 UTC by Alex P
Modified: 2011-09-05 14:33 UTC (History)
2 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 FIXED

Description Alex P 2011-08-30 16:52:42 UTC
I cannot build my project, I get : mtouch failed with no output (1) 

The error seems to be : 

Could not link assemblies: Mono.Linker.ResolutionException: Can not resolve reference: System.Boolean 


Here's the build output :

Compiling to native code
/Developer/MonoTouch/usr/bin/mtouch -v --nomanifest --nosign -dev "/sources/AOP/iPhoneApp/src/iPhone/VinGo/bin/iPhone/Release/Aop.app" "-r=/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" "-r=/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" "-r=/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" "-r=/Developer/MonoTouch/usr/lib/mono/2.1/System.ServiceModel.dll" "-r=/Developer/MonoTouch/usr/lib/mono/2.1/System.Runtime.Serialization.dll" "-r=/Developer/MonoTouch/usr/lib/mono/2.1/Mono.Data.Sqlite.dll" "-r=/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll" "-r=/sources/AOP/iPhoneApp/src/iPhone/Libs/ZBarReaderViewController.dll" "-r=/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.Linq.dll" "-r=/Developer/MonoTouch/usr/lib/mono/2.1/System.Web.Services.dll" -linksdkonly "-sdk=4.3" -v -v -v -v  -aot="nimt-trampolines=2048" -gcc_flags "-L/sources/AOP/iPhoneApp/src/iPhone/VinGo/Lib -lzbar -framework QuartzCore  -weak_framework AVFoundation -weak_framework CoreMedia -weak_framework CoreVideo  -framework CoreGraphics -framework CFNetwork -Foundation -UIKit  -ObjC" "/sources/AOP/iPhoneApp/src/iPhone/VinGo/bin/iPhone/Release/VinGo.exe"
Framework is: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk
Copied /sources/AOP/iPhoneApp/src/iPhone/VinGo/bin/iPhone/Release/VinGo.exe to /sources/AOP/iPhoneApp/src/iPhone/VinGo/bin/iPhone/Release/Aop.app/VinGo.exe
Copied /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll to /sources/AOP/iPhoneApp/src/iPhone/VinGo/bin/iPhone/Release/Aop.app/monotouch.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/mscorlib.dll to /sources/AOP/iPhoneApp/src/iPhone/VinGo/bin/iPhone/Release/Aop.app/mscorlib.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.dll to /sources/AOP/iPhoneApp/src/iPhone/VinGo/bin/iPhone/Release/Aop.app/System.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll to /sources/AOP/iPhoneApp/src/iPhone/VinGo/bin/iPhone/Release/Aop.app/System.Core.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.ServiceModel.dll to /sources/AOP/iPhoneApp/src/iPhone/VinGo/bin/iPhone/Release/Aop.app/System.ServiceModel.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Runtime.Serialization.dll to /sources/AOP/iPhoneApp/src/iPhone/VinGo/bin/iPhone/Release/Aop.app/System.Runtime.Serialization.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll to /sources/AOP/iPhoneApp/src/iPhone/VinGo/bin/iPhone/Release/Aop.app/System.Xml.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.Linq.dll to /sources/AOP/iPhoneApp/src/iPhone/VinGo/bin/iPhone/Release/Aop.app/System.Xml.Linq.dll
Linking SDK only for assembly /sources/AOP/iPhoneApp/src/iPhone/VinGo/bin/iPhone/Release/VinGo.exe into /sources/AOP/iPhoneApp/src/iPhone/VinGo/bin/iPhone/Release/Aop.app
Could not link assemblies: Mono.Linker.ResolutionException: Can not resolve reference: System.Boolean MonoTouch.ObjCRuntime.Messaging::Boolean_objc_msgSend(System.IntPtr,System.IntPtr)
  at Mono.Linker.Steps.MarkStep.ResolveMethodDefinition (Mono.Cecil.MethodReference method) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.MarkStep.MarkMethod (Mono.Cecil.MethodReference reference) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.MarkStep.Process () [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0 
  at MonoTouch.Tuner.Linker.Run (Mono.Linker.Pipeline pipeline, Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
Comment 1 Sebastien Pouliot 2011-08-30 17:25:02 UTC
Generally a quick workaround would be to add "--linkskip=mscorlib" to your "extra mtouch arguments" (in Project Options, iPhone Options). That would skip mscorlib.dll from being reduced by the linker.

However I think the error is misleading, the "real" issue is that:

MonoTouch.ObjCRuntime.Messaging::Boolean_objc_msgSend(System.IntPtr,System.IntPtr)

was renamed to bool_objc_msgSend in recent MonoTouch release. Regenerating your bindings (likely for ZBarReaderViewController.dll) using 'btouch' should solve your problem.
Comment 2 Alex P 2011-08-30 17:35:53 UTC
You are right, it's probably my binding! I should of thought of that.  I will try that.

Merci!
Comment 3 Sebastien Pouliot 2011-09-05 13:45:28 UTC
Alex, can you confirm if rebuilding your binding solved your issue ? 
If so then you can close the bug report :-)
Merci
Comment 4 Alex P 2011-09-05 14:33:36 UTC
Yes rebinding has fixed my problem.