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