I have the following code in a library project that is referenced within a Xamarin.Mac Modern targeted project.
GlobalContext.Properties["LoggingPath"] = Path.Combine(ConfigurationHelper.sConfigurationPath, "logs"); log4net.Config.XmlConfigurator.Configure(new FileInfo(file));
The main project which generates an executable references System.Xml version 184.108.40.206 from the Xamarin.Mac package.
The following error occurs during build:
The type 'XmlElement' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml, Version=220.127.116.11, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
It could be interesting to note that I have a Xamarin.iOS project that uses the same set up obviously targeting Xamarin.iOS instead and that is working. I've not yet found what it is that's different other than the implementation of System.Xml.