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.
I am unable to bundle Mono, even with a brand new example solution.
1) Create a new Xamarin.Mac Project
2) Enable "Include the Mono runtime in the application bundle" in the project settings.
4) The build fails with the error below:
Building: TestXMac (Debug|x86)
Performing main compilation...
/Library/Frameworks/Mono.framework/Versions/2.10.11/bin/dmcs /noconfig "/out:/Users/aramant/Projects/TestXMac/TestXMac/bin/Debug/TestXMac.exe" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.Xml.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.Core.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.Xml.Linq.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.Drawing.dll" "/r:/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/usr/lib/mono/XamMac.dll" /nologo /warn:4 /debug:full /optimize- /codepage:utf8 /platform:x86 "/define:DEBUG" /t:exe "/Users/aramant/Projects/TestXMac/TestXMac/MainWindow.cs" "/Users/aramant/Projects/TestXMac/TestXMac/MainWindowController.cs" "/Users/aramant/Projects/TestXMac/TestXMac/MainWindow.designer.cs" "/Users/aramant/Projects/TestXMac/TestXMac/Main.cs" "/Users/aramant/Projects/TestXMac/TestXMac/AppDelegate.cs" "/Users/aramant/Projects/TestXMac/TestXMac/AppDelegate.designer.cs"
Build complete -- 0 errors, 0 warnings
Merging Mono Runtime into app bundle
/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/usr/bin/mmp -nolink "-minos=10.6" --sdkroot "/Applications/Xcode.app/Contents/Developer" -o "/Users/aramant/Projects/TestXMac/TestXMac/bin/Debug" -n "TestXMac" --profile "4.0" --debug -a "/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.Xml.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.Core.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.Xml.Linq.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.Drawing.dll" -a "/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/usr/lib/mono/XamMac.dll" "/Users/aramant/Projects/TestXMac/TestXMac/bin/Debug/TestXMac.exe"
error MM0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
System.ComponentModel.Win32Exception: ApplicationName='pkg-config', CommandLine='--variable=prefix mono-2', CurrentDirectory=''
at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0
at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0
at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x00000] in <filename unknown>:0
at MonoMac.Bundler.Driver.RunCommand (System.String path, System.String args, System.String env, System.String& output) [0x00000] in <filename unknown>:0
at MonoMac.Bundler.Driver.get_MonoDirectory () [0x00000] in <filename unknown>:0
at MonoMac.Bundler.Driver.Pack (IList`1 unprocessed) [0x00000] in <filename unknown>:0
at MonoMac.Bundler.Driver.Main2 (System.String args) [0x00000] in <filename unknown>:0
at MonoMac.Bundler.Driver.Main (System.String args) [0x00000] in <filename unknown>:0
mmp exited with code 1
Detailed info from X.Studio:
=== Xamarin Studio ===
Version 4.0 (build 2003)
Installation UUID: 1fcc71a0-766d-4a62-b611-8edd0fdc5d1e
Mono 2.10.11 (mono-2-10/2baeee2)
Package version: 210110000
=== Apple Developer Tools ===
Xcode 4.6 (2066)
=== Xamarin.iOS ===
Version: 184.108.40.206 (Starter Edition)
=== Xamarin.Mac ===
=== Xamarin.Android ===
=== Build Information ===
Git revision: Release ID: 400002003
Build date: 2013-02-20 00:32:59+0000
Xamarin addins: b7a7aff09b352c13ded8a27439fd6d2250361511
=== Operating System ===
Mac OS X 10.8.2
Darwin davids-mac-mini.net.sep.com 12.2.0 Darwin Kernel Version 12.2.0
Sat Aug 25 00:48:52 PDT 2012
Additionally, the first time it is built (after being cleaned) there is a warning: "Warning: Could not determine value for manifest key 'DTPlatformBuild'"
This warning goes away if you build it more than once.
That's likely because Xamarin.Mac currently* requires Xcode "Command-Line Tools" to be installed to get some tools, like pkg-config.
You can install them by doing the following:
* start Xcode;
* go to the Xcode menu;
* select the Preferences... item;
* select the Downloads icons;
* click on "install" button for the "Command Line Tools"
Once installed you should be able to build your project without error.
* future versions of Xamarin.Mac will remove this requirement (but it's often useful to have the tools installed) but it;s still required to build iOS apps.
Unfortunately, I already had the Xcode command line tools installed, so that isn't it.
Could this have something to do with Homebrew? I know you guys recently changed something in Mono 3 to get around some conflict.
Good catch, that's likely the reason - if you did not install (or keep) a previous install of the Mono SDK (since any of them would have "installed" the tool in /usr/bin).
As a workaround you can create a symlink from:
This is what the installer did (previously). I'll look at making `mmp` not depend on the /usr/bin location (for future, post-1.2, releases).
Creating the symlink worked; thanks!
When you say "future post-1.2" releases, what are you referring to? Xamarin.Mac? MMP?
It's all the same. MMP ships with Xamarin.Mac (along with XamMac.dll and a few other tools, like btouch).
Thanks for confirming the workaround!
Xamarin.Mac 1.2.33+ will have a fix built-in.
Thanks for the report!
Today we have checked this issue with following builds:
X.S 4.0 - 1645b898271456799b70944c8b356ed6c5c00fdf
Now we are able to build and run project successfully after selecting 'Include the Mono runtime in the application bundle'
Changing the status to verified.
*** Bug 11147 has been marked as a duplicate of this bug. ***