I've been using the MySql.Data package (which I believe is managed by Oracle) with a command line Xamarin project perfectly well for a number of months but I'm struggling to get it running with Xamarin.Mac.
Even when compiling I'm getting a significant number of serious sounding warnings, but compiles. The first few warnings out of 23 are along the lines of:
Warning MM2006: Native library '/Users/username/Test_OSX/Test_OSX/bin/Debug/Test_OSX.app/Contents/MonoBundle/libMonoPosixHelper.dylib' was referenced but could not be found. (MM2006) (Test_OSX)
Warning MM2006: Native library '/Library/Frameworks/Xamarin.Mac.framework/Versions/22.214.171.124/lib/libsecur32.dylib' was referenced but could not be found. (MM2006) (Test_OSX)
Warning MM2006: Native library 'libsecur32.dylib' was referenced but could not be found. (MM2006) (Test_OSX)
Warning MM2009: Referenced by MySql.Data.MySqlClient.Authentication.MySqlWindowsAuthenticationPlugin.AcquireCredentialsHandle (MM2009) (Test_OSX)
However, when attempting to run the Xamarin.Mac application with some test/example MySQL connection code I get the following error on NSApplication.Init():
System.IO.FileNotFoundException has been thrown. Could not load file or assembly 'System.Drawing' or one of its dependencies
Which is a bizarre and seemingly unrelated error that goes away when removing the MySQL Connection code.
Should we be expecting the MySQL.Data package in the official NuGet gallery to work out of the box with Xamarin.Mac? I have even tried compiling the package from source direct from Oracle (in case it was an issue with x86/x64 platform types or something) but that hasn't help either - I get the same issue.
Any help would be appreciated.