FSharp.Data.SqlClient
FSharp.Data.SqlClient copied to clipboard
build.cmd on master fails with "Could not load file or assembly 'System.Data.SqlClient'"
I'm working on #348, but it's a bit hard to contribute to the project, because running build.cmd (even on a clean checkout of master) fails on the BuildTestProjects target:
C:\Users\Christer\Source\Repos\SqlClient-Test\src\SqlClient.TestProjects\SqlClient.Tests.NET40\Program.fs(8,21): error FS3033: The type provider 'FSharp.Data.SqlCommandProvider' reported an error: Could not load file or assembly 'System.Data.SqlClient, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. [C:\Users\Christer\Source\Repos\SqlClient-Test\src\SqlClient.TestProjects\SqlClient.Tests.NET40\SqlClient.Tests.NET40.fsproj]
Am I doing anything wrong? Could there be something wrong with my environment?
About 2-3 weeks I create a new test project that uses FSharp.Data.SqlClient in dotnet core 3 and everything work fine building using dotnet publish via fake. However, I came to build the same project this week and now I get the System.Data.SqlClient, Version=4.4.0.0 error message. I have not changed the code so I am guessing a windows update, dotnet update or VS update has happened which has thrown everything out (it happens so often I can’t remember).
@cmeeren I think this is related to https://github.com/dotnet/fsharp/issues/10323.
I'll see how to make it work out of the box as I'm also facing similar issues, the current work around is to clear:
https://github.com/fsprojects/FSharp.Data.SqlClient/blob/8dd0898fbe9663a7785f2b094a30bf6f36e477cc/build.fsx#L168-L175
Interestingly, the same task just works on our appveyor CI AFAIU.
@cmeeren, this repository has been updated to dotnet sdk 7 / VS2022 and clears green on Travis.
I was also sketching to make what I can, work on non windows machine, at some point.
If you have some will to check it again, feel free to do so and report issues again, I'll close this now.
Thanks.