[MonoDevelop] OS X packaging fails with ResolutionException when targetting .NET 4.5

Ulrich Hertlein u.hertlein at gmail.com
Tue Oct 23 00:50:23 UTC 2012


Hi all,

When creating an unmodified MonoMac template project (from
MonoDevelop-3.0.4.7) and setting it to target the .NET 4.5 runtime
with the 'link with Mono runtime' (SDKs only or all) option, packaging
fails with a "Mono.Cecil.ResolutionException" from inside mmp (see
stack trace below).

This happens with both Mono-2.11.4 and Mono-3.0.
Setting the target to .NET 4.0 solves the packaging error, but of
course then async/await won't work.

Has anyone else experienced this?

I don't think there's anything unusual about my setup, just Mono-SDK,
MonoDevelop and Xcode.
I've removed previous installations of Mono.framework to rule out any
legacy lava but nothing seems change the situation.

Thanks,
/uli

PS: This is #7888 in the Xamarin bugzilla.
PPS: This was previously posted to mono-osx but feels appropriate
here; apologies for cross-posting.

<code>
Merging Mono Runtime into app bundle
/Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.MonoMac/mmp
"-minos=10.6" -o "/Users/uli/Projects/Mac4dot5/bin/Debug" -n
"Mac4dot5" -a "/Library/Frameworks/Mono.framework/Versions/3.0.0/lib/mono/4.5/System.dll"
-a "/Library/Frameworks/Mono.framework/Versions/3.0.0/lib/mono/4.5/System.Core.dll"
-a "/Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.MonoMac/MonoMac.dll"
-a "/Library/Frameworks/Mono.framework/Versions/3.0.0/lib/mono/gac/Mono.Cecil/0.9.5.0__0738eb9f132ed756/Mono.Cecil.dll"
"/Users/uli/Projects/Mac4dot5/bin/Debug/Mac4dot5.exe"
Could not link assemblies: Mono.Cecil.ResolutionException: Failed to
resolve System.Void
System.Runtime.CompilerServices.ExtensionAttribute::.ctor()
  at Mono.Linker.Steps.MarkStep.MarkMethod (Mono.Cecil.MethodReference
reference) [0x00000] in <filename unknown>:0
  at Mono.Linker.Steps.MarkStep.MarkCustomAttribute
(Mono.Cecil.CustomAttribute ca) [0x00000] in <filename unknown>:0
  at Mono.Linker.Steps.MarkStep.MarkCustomAttributes
(ICustomAttributeProvider provider) [0x00000] in <filename unknown>:0
  at Mono.Linker.Steps.MarkStep.MarkAssembly
(Mono.Cecil.AssemblyDefinition assembly) [0x00000] in <filename
unknown>:0
  at Mono.Linker.Steps.MarkStep.InitializeAssembly
(Mono.Cecil.AssemblyDefinition assembly) [0x00000] in <filename
unknown>:0
  at Mono.Linker.Steps.MarkStep.Initialize () [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]Failed to link
/Users/uli/Projects/Mac4dot5/bin/Debug/Mac4dot5.exe
 in <filename unknown>:0
  at MonoMac.Tuner.Linker.Run (Mono.Linker.Pipeline pipeline,
Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
mmp exited with code 1
</code>


More information about the Monodevelop-list mailing list