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 cannot successfully compile a solution that uses Xamarin.Mac with xbuild.
1) Create a new Xamarin.Mac Project
2) Attempt to build the solution at the console with xbuild
3) Build fails
I've tried both Mono 3 and 2. Ideally we would like to use 3. I have seen two types of failures; I'm not sure how to make one or the other show up.
Currently it is failing with a bunch of CS0246 compiler errors indicating that it can't find the MonoMac namespace.
The other error condition I've seen (which I am currently unable to reproduce) is that it cannot find /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/v0.0/Xamarin.Mac.targets. I've looked for this file under the Mono.framework and Xamarin.Mac.framework folders and I couldn't find it. It is referenced in the project file as:
There are two reasons why we want to build our solution in xbuild:
1) We depend on some conditional logic in the csproj files for different references depending on the platform (Win/Mac). Xamarin Studio / MonoDevelop does not seem to support this like VS does.
2) For the CI server.
I would love to see xbuild support for Xamarin.Mac as well - it would make compiling cross platform apps a lot easier, and bring better support for adding custom targets and leveraging utilities like nuget.
xbuild support is on the radar, but I do not have a time estimate. Currently the tooling uses Xamarin Studio's internal build support.
You can build Xamarin.Mac projects on the command line using mdtool however, so you at least don't need to open the IDE:
/Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool build --help
/Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool build Project.sln
/Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool build -t:Clean Project.sln
Sorry for the long delay in responding to this bug.
Xamarin.Mac Unified projects are now msbuild under the hood. We don't expect classic XM projects to move to msbuild in the medium term.