FSharp.Data.SqlClient
FSharp.Data.SqlClient copied to clipboard
Netcore DTC
@smoothdeveloper
Addressing #337 - still a work in progress and I'm not sure I have tested all the use cases, but this works with the test projects.
However, I have an existing netcore project which stopped working when I moved from 2.0.2 to 2.0.5 which I was hoping I would have addressed here. (That's why I started this PR with a revert of the commit for #338 - post-revert, my project compiles so that is the commit that introduced the issue.)
With 2.0.5 I get the following error at compile:
The type provider 'FSharp.Data.SqlProgrammabilityProvider' reported an error: Could not load file or assembly 'System.Data.SqlClient, Version=4.5.0.1
And now when I reference the version in this branch I get almost the exact same thing:
The type provider 'FSharp.Data.SqlProgrammabilityProvider' reported an error: Could not load file or assembly 'System.Data.SqlClient, Version=4.5.0.0
My project references System.Data.SqlClient version 4.6.1 and I have binding redirects turned on, so I am not sure what is going on. Looks similar to this issue: https://github.com/fsprojects/SQLProvider/issues/529.
I should add that I only get the errors described above when compiling via dotnet build - everything works fine with MsBuild/Visual Studio.
We're seeing this exact issue currently
I too have had this error for a long time. It's preventing me from using VS Code, among other things. It would be great to have this fixed! :)
related:
- #380
- #373
- https://github.com/dotnet/fsharp/issues/10323
@samhanes I'm not sure what is the status on this, but building projects referencing the provider without full framework compiler seems to be messy for now.
I think the scenarios are :
- projects using old SDK format still compile with recent compiler / VS tooling (if supporting build from vs2015 era tooling cause an issue, people can use older version)
- project using new SDK format targetting either netstandard, .net framework or .net core / 5+ can be build the same from VS and
dotnetcommands
I'd like to think this is something that needs to be addressed in the compiler itself as it is apparently very difficult to get TP to work when targetting the different platforms using the .net core toolchain.