fsprojects / SQLProvider

A general F# SQL database erasing type provider, supporting LINQ queries, schema exploration, individuals, CRUD operations and much more besides.
https://fsprojects.github.io/SQLProvider
Other
564 stars 144 forks source link

Compilation issue with .net core 3.1 #688

Closed vparadis closed 7 months ago

vparadis commented 3 years ago

Describe the bug When trying to get the type of the DB using type Db = SqlDataProvider<...>, VS throws

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..

I've been looking around for a fix to this issue and despite trying all the solutions I found (mostly adding references or dlls to the resPath), I can't get it to work. Tried following the tutorial here as well, but I get the exact same error.

There seem to be a mismatch between the dlls referenced by the package and the ones that were downloaded with it. See screenshot below.

To Reproduce This tutorial does it for me.

Expected behavior Compiles without errors

Screenshots image

image

Desktop (please complete the following information):

Additional Info I use a folder called /lib for the additional dlls (resPath), in which I have Npgsql.dll, System.Data.Common.dll, System.Runtime.CompilerServices.Unsafe.dll and System.Threading.Tasks.Extensions.dll.

Shmew commented 3 years ago

I haven't had any issues targeting .NET Core 3.1. Looking at my project dependencies I do see some differences:

image

In development I targeted a localdb mssql instance, and it targets mssql in production.

Don't know if any of that is helpful, but hopefully it is!

Thorium commented 3 years ago

There has been some issues with System.Data.SqlClient on .Net Core 3.1, so there is the dynamic version: https://github.com/fsprojects/SQLProvider/issues/645#issuecomment-639163535

Thorium commented 7 months ago

Should be fixed already