The type provider 'FSharp.Data.SqlCommandProvider' reported an error: System.Data.SqlClient is not supported on this platform

387 Views Asked by At

I'm trying to create a small F# script that will be using FSharp.Data.SqlClient or other SQL Type Prodiver. I also tried SQLProvider. I always get the following error :

The type provider 'FSharp.Data.SqlCommandProvider' reported an error: System.Data.SqlClient is not supported on this platform.

I'm using Visual Studio 2022 with .NET 6. I also tried with .NET 4.7.2.

1

There are 1 best solutions below

0
user2187032 On

The maintainer of the project gave me a fix for the issue : https://github.com/fsprojects/FSharp.Data.SqlClient/issues/423.

I had to force the evaluation of the System.Data.SqlClient nuget with ";;" :

#r "nuget: System.Data.SqlClient";;

at the beginning of the script.

@BentTranberg, the maintainer said he is evaluating the change to Microsoft.Data.SqlClient.

Related Questions in F#