Open esbenbjerre opened 2 years ago
Also does not work on mac os .NET 6 and FSI
I can't make it work as well on OSX within a .NET 6 console app.
I tried using MSSQLSERVER_DYNAMIC and the ResolutionPath but it didn't work as well.
I use paket to make sure FSharp.Core & co are on point. I use FSharp.Core 6.0.4
Here's my paket.dependencies :
Here's my paket.references for the console app :
If anything else is needed, please let me know.
I tried using MSSQLSERVER_DYNAMIC and the ResolutionPath but it didn't work as well.
You should be using Microsoft.Data.SqlClient
in conjunction with MSSQLSERVER_DYNAMIC and the ResolutionPath.
Hello,
Thanks for the reply. I tried but I still got issue. What Dlls should I copy in the resolution path ?
What Dlls should I copy in the resolution path ?
It should be these:
To use another driver, Microsoft.Data.SqlClient.dll, you have to set your provider to Common.DatabaseProviderTypes.MSSQLSERVER_DYNAMIC and copy the reference files from the NuGet package to local resolutionPath
(e.g. Microsoft.Data.SqlClient.dll, Microsoft.Data.SqlClient.SNI.dll and Microsoft.Data.SqlClient.SNI.x86.dll).
Hello again,
I had to take a break from that issue but I'm back. I tried your solution but it does not work.
I am currently using a fsx for my need. Is there a way, I can get the details of the exception ? So far I just have the folowing :
I tried 'dotnet fsi --debug' bug I don't have the stack trace.
Thanks again for your help.
I tried using MSSQLSERVER_DYNAMIC and the ResolutionPath but it didn't work as well.
You should be using
Microsoft.Data.SqlClient
in conjunction with MSSQLSERVER_DYNAMIC and the ResolutionPath.
Using VS2022, in a console app targeting .net 6.0, I'm getting this error:
error FS3033: The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.Details: Cannot load a reference assembly for execution.Could not load type 'System.Data.Common.DbCommandBuilder' from assembly 'System.Data.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.Could not load type 'System.Data.Common.DbDataAdapter' from assembly 'System.Data.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.Could not load type 'System.Data.Common.RowUpdatedEventArgs' from assembly 'System.Data.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.Could not load type 'System.Data.Common.RowUpdatingEventArgs' from assembly 'System.Data.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.Could not load type 'System.Data.Common.DbDataSourceEnumerator' from assembly 'System.Data.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.Current execution platform: .NETFramework,Version=v4.7.2
This is in my resolution path:
Describe the bug I want to use SQLProvider with SQL Server in .NET 5 FSI. I'm using WSL (Ubuntu) on Windows. No matter how I try to load it, it does not work. I have tried various workarounds posted here and online. I've tried:
#r "nuget: SQLProvider"
ResolutionPath
No matter how I try I get one of these errors on
dotnet fsi script.fsx
:or
or
To Reproduce Create blank project
Try to use SQLProvider from FSI
Expected behavior A working SQLProvider.