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 21413 [details]
Release mode Errors Screenshot and IDE logs
-Sample Mac app template is able to deploy in DEBUG mode with target framework as "Unsupported Framework" but same template we are unable to deploy in RELEASE mode only in EL Capitan
-Mac OS with El Capitan 10.11.6 is required
Steps to reproduce
1-Create a mac app project
2-Select Config as Release mode
3-Deploy and Observe the Errors
-Getting incompatibility error given "error MM4162: The type 'AVFoundation.AVContentKeyRequest' (used as a parameter in AVFoundation.AVContentKeySession.RenewExpiringResponseData) is not available in macOS 10.12.2 (it was introduced in macOS 10.12.4). Please build with a newer macOS SDK (usually done by using the most recent version of Xcode)."
-Same Project is getting deploy in Debug mode with same configuration
Gist Build Output
On OS El Capitan we are facing this issue with Config given below
-Mac Application in Release mode + Targeted Framework as Unsupported OR Xamarin.Mac .Net 4.5 Framework
This morning I just mindlessly clicked through the Xamarin update prompt and am now experiencing this issue, too.
Mac OS Sierra, 10.12.3. Same configuration as above: Release build using Xamarin.Mac .Net 4.5 Framework
I made exactly the same mistake and updated my Xamarin Studio and I cannot build in Release config any more - same errors.
Error MM4162: The type 'AVFoundation.AVContentKeyRequest' (used as a parameter in AVFoundation.AVContentKeySession.RenewExpiringResponseData) is not available in macOS 10.12.2 (it was introduced in macOS 10.12.4). Please build with a newer macOS SDK (usually done by using the most recent version of Xcode).<--- (MM4162) (projname) ---> (Inner Exception #0)
28 build errors.
So these errors are expected given your setup, but the confusion is understandable. First the solution. Either:
- Upgrade to 10.12 and Xcode 8.3 OR
- If you are using Xamarin.Mac Mobile (Modern) Target Framework (https://developer.xamarin.com/guides/mac/advanced_topics/target-framework/) you can enable link SDK OR
- Add --registrar:dynamic to your Project Options -> Mac Build -> Additional MMP Arguments
Now let me explain how we got here:
- In Xamarin.Mac 3.2 the default behavior for Release mode builds was changed (https://developer.xamarin.com/releases/mac/xamarin.mac_3/xamarin.mac_3.2/#Release_Mode_MMP_Default_Changes) to include use of the static registrar. This drastically improves launch time performance.
- When linking is disabled, the static registrar links in every binding type, which requires use of the latest Xcode when building, which would be Xcode 8.3
- Xcode 8.3 requires macOS 10.12 (https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html)
- So we can either disable the static registrar, use the newer Xcode, or enable linking to strip away these types if unneeded.
I believe we can message this condition better, so I've filed a separate bug for that:
Hello. I've encountered the same issue.
However enabling link Framework SDKs only breaks application in runtime due to heavy usage of reflection by MEF. Is there any way to find out what exactly to force linking?
You don't always have an option to upgrade XCode or MAC OS e.g. on deploy machines.
well, --registrar:dynamic solved the issue.
however with following runtime error message:
objc: Class VCWeakObjectHolder is implemented in both /System/Library/PrivateFrameworks/AVConference.framework/Frameworks/ViceroyTrace.framework/Versions/A/ViceroyTrace (0xa64ca090) and /System/Library/PrivateFrameworks/AVConference.framework/Versions/A/AVConference (0xa64e0ea4). One of the two will be used. Which one is undefined.