SQLProvider icon indicating copy to clipboard operation
SQLProvider copied to clipboard

Compilation issue with .net core 3.1

Open vparadis opened this issue 5 years ago • 2 comments
trafficstars

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):

  • OS: Windows 10
  • Visual studio 2019 (also doesn't work in CLI or VS Code)

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.

vparadis avatar Aug 22 '20 01:08 vparadis

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!

Shmew avatar Sep 03 '20 17:09 Shmew

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 avatar Sep 03 '20 18:09 Thorium

Should be fixed already

Thorium avatar Nov 20 '23 23:11 Thorium