Thanx. I can repro the System.PlatformNotSupportedException: System.Data.SqlClient is not supported on this platform.
. But are we sure thats in error? maybe that class really just is not supported own macOS? As far as I can tell, it builds fine, it copies/uses the SqlClient dll from the netstandard2.0
folder, which would be the right version to use in a core 2.x app…
That said, your main project is not a .NET Core app, it’s a standard .NET app (<TargetFramework>.NETFramework4.6</TargetFramework>
), so it runs as Mono, not on .NET Core.
The loaded dlls are
#> (edb) image list
~> [0] Dapper, Version=1.50.5.0, Culture=neutral, PublicKeyToken=null: /Users/mh/Downloads/DataAcessStandardClassLibrary/NetConsoleApplication/Bin/Debug/Dapper.dll [no symbols]
~> [1] DataAcessStandardClassLibrary, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null: /Users/mh/Downloads/DataAcessStandardClassLibrary/NetConsoleApplication/Bin/Debug/DataAcessStandardClassLibrary.dll [no symbols]
~> [2] NetConsoleApplication, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null: /Users/mh/Downloads/DataAcessStandardClassLibrary/NetConsoleApplication/Bin/Debug/NetConsoleApplication.exe [no symbols]
~> [3] System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089: /Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll [no symbols]
~> [4] System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089: /Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll [no symbols]
~> [5] System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089: /Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/gac/System.Data/4.0.0.0__b77a5c561934e089/System.Data.dll [no symbols]
~> [6] System.Data.SqlClient, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a: /Users/mh/Downloads/DataAcessStandardClassLibrary/NetConsoleApplication/Bin/Debug/System.Data.SqlClient.dll [no symbols]
~> [7] System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089: /Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/gac/System.Transactions/4.0.0.0__b77a5c561934e089/System.Transactions.dll [no symbols]
~> [8] System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089: /Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll [no symbols]
~> [9] mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089: /Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/mscorlib.dll [no symbols]
~> [10] netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51: /Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/Facades/netstandard.dll [no symbols]
So it’s using the referenced SqlClient dll, from .NETStandard, on Mono (5.16 ion my case). tbh I’m not sure f that’s something that’s supposed to work. Chances are, the error is legit.