Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 2761 [details]
OS X (MonoMac) solution/project; build 'Debug|x86
Using the following:
Mono 2.11.4 (the only Mono runtime installed on the system)
OS X 10.8.2
Target framework .Net 4.5
Building a simple OS X project package with included Mono runtime and "Link all" or "Link frameworks" fails with a ResolutionException:
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/2.11.4/lib/mono/4.5/System.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.11.4/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/2.11.4/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
Works fine when targetting .Net 4.0 (with Mono-2.11.4 installed)
Also happens when using Mono-3.0 with the .NET 4.5 runtime.
Sebastien: any ideas?
The System.Runtime.CompilerServices.ExtensionAttribute was moved to mscorlib.dll and that affects mmp's linker (as it does other tools ).
*** Bug 7114 has been marked as a duplicate of this bug. ***
The current `mmp` is a bit old (from 2.10 times) and it's defaulting for 4.0. The logic to get 4.5 (or future versions) depends on the assembly versions - which was not changed for .NET 4.5 (it's still 4.0). So we need a bit more logic to cover this case...
This, and a few other 4.5 specific, issues are now fixed. Thanks for reporting the issue.
Is this part of MonoDevelop or Mono? I couldn't find a commit in either that looked like it might be related.