[Mono-dev] Mono vs. Net Core and p/invoke to native libraries on multiple OS/platforms
linqdan2000 at gmail.com
Mon Dec 5 03:47:21 UTC 2016
How do I determine what operating system/platform
.net core is running on?
On Mono, you could handle different library names and file extensions via a config file for the library. .net framework does not have this. Not sure about .net core.
Example, i have a library foo.dll on Windows, libfooclient.so on Linux and libfoo.dynlib on macOS.
I ported mono's old Odbc to .net core. Porting the .Net Reference implementation would be better, but this was an effort so we could connect to data sources with no .net core data access provider like IBM DB2 now.
Same thing with the oracle client i ported, i need to modify it to work on Linux too.
danmorg on GimpNet IRC
Begin forwarded message:
> From: Daniel Morgan <linqdan2000 at gmail.com>
> Date: November 11, 2016 at 9:44:42 AM EST
> To: mono-devel-list at lists.dot.net
> Subject: Oracle .net core provider
> I took Mono Project's System.Data.OracleClient implementation and modified it for .net core. It works on .net core via visual studio 2015 on a Windows 10 64-bit machine with a local Oracle 12c database. Feel free to fork it.
> This was done in one evening to get it to build and run. It will need to be reviewed and cleaned up.
> Some notes:
> - string.Copy does not exist in .net core so i just called ToString or set a reference. So, i need to re-visit that code in oci define handles and parameters.
> - no DataTable so a lot of code for getting schema and db data adapter was commented.
> - string.Compare(string, string, bool, globalization) did not exist but Compare(string, string, bool does.
> - remove all design-time component attributes
> - added various usings for the different namespaces for some stuff
> - added reference to System.Data.Common
> - I may have added SqlClient as well for SqlTypes.INullable. Added other references to satisfy errors.
> What would it take to build a EF Core provider for Oracle?
> Been awhile since i played with Mono.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list