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 188.8.131.52 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=184.108.40.206, 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.