Closed MiYogurt closed 5 years ago
It does. You need to add ResolutionPath parameter to a path where are the npgsql.dll and the dll missing in the error: System.Threading.Tasks.Extensions.dll
Get them from Nuget and put a directory referenced by ResolutionPath. The reason for this is that the database driver is loaded via reflection, and .Net reflection cannot load directly from Nuget.
@Thorium Thanks very very very very much
He finally worked.
#/bin/env sh
cp /Users/yugo/.nuget/packages/npgsql/4.0.6/lib/netstandard2.0/Npgsql.dll ./libs/Npgsql.dll
cp /Users/yugo/.nuget/packages/system.threading.tasks.extensions/4.5.2/lib/netstandard2.0/System.Threading.Tasks.Extensions.dll ./libs
cp /Users/yugo/.nuget/packages/system.runtime.compilerservices.unsafe/4.5.2/lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll ./libs
cp /Users/yugo/.nuget/packages/system.memory/4.5.2/lib/netstandard2.0/System.Memory.dll ./libs
let [<Literal>] connString = "Host=localhost;Database=test_db;Username=bob;Password=bob"
let [<Literal>] dbVendor = Common.DatabaseProviderTypes.POSTGRESQL
type sql = SqlDataProvider<dbVendor,connString, "", "./libs" >
let runtimeConnectionStr = connString
let ctx = sql.GetDataContext(runtimeConnectionStr)
Description
SQLProvider not support macos ? i see the post http://fsprojects.github.io/SQLProvider/core/netstandard.html#NET-Standard-NET-Core-support
it look like supported.
but i got error
i tested . the
Npgsql
no problemIt's too difficult for beginners. Especially for non-Windows user ,i am hope has some docker's sample
Repro steps
all code in here,i just use f# crawl some data for save to
postgresql
dbhttps://github.com/MiYogurt/flower_crawler/blob/master/flower_crawler/DB.fs
Expected behavior
let it work in mac os
Actual behavior
not work
Known workarounds
not found
https://github.com/fsprojects/SQLProvider/tree/master/tests/SqlProvider.Core.Tests/Postgres not work
Related information