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