Closed arnesahlberg closed 3 years ago
Are you loading System.Data.SqlClient
dll from the platform, or from NuGet?
I think VS2019 is running .NET Framework full as default, VS Code is running .NET Core as default. Both should work... But the version of needed database driver, System.Data.SqlClient, might be different. If you are not using the SSDT provider, then you can use MSSQLSERVER_DYNAMIC and load whatever driver you want.
Are you loading
System.Data.SqlClient
dll from the platform, or from NuGet?
I'm just adding the nuget package using dotnet add package
. Do I need to do something more to add the dll?
Edit: Also, I tried to use MSSQLSERVER_DYNAMIC and it says it can't find the dll, so maybe there is a problem with that.
Also saw a ton of this with Rider. Dacpac seems to work the best, but running into separate issues.
The dynamic needs the resolutionpath setting for the library.
Describe the bug When trying to create the SqlDataProvider I get the error "The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error: System.Data.SqlClient is not supported on this platform." If I create the program with
dotnet new
and use Visual Studio Code, that is. However, if I do the same thing in Visual studio 2019 it works as it should. I'm wondering what could be wrong...To Reproduce Steps to reproduce the behavior:
dotnet new
using dotnet sdk 5 (get same error with 3)dotnet add package
let [] ConnStr = "Server=Localhost;Database=TestDB;User Id=SA;Password=mypassword";
type Sql = SqlDataProvider< Common.DatabaseProviderTypes.MSSQLSERVER, ConnStr>
let ctx = Sql.GetDataContext()