-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project with target netcoreapp2.0 will not build with SQLProvider package version 1.1.38. #529
Comments
We need a bit more description here:
|
I hope this repo will help, but you will probably need to run dotnet restore to install the 2 nuget packages listed in the .fsproj file. https://github.com/ScottHutchinson/sqlprovider-dotnetcore-demo/tree/mcve |
It seems that you don't have the FscToolPath and FscToolExe set in the projects. They were needed at least a month ago. I don't know if this has changed since as .NET Standard/Core seems to change quite often. |
I do too. Make sure you are looking at the mcve branch, not the master branch. |
To produce .NET Standard code you have to use net451 version of SQLProvider on compile time and then you can use the correct version on runtime. That is how typeproviders currently work, and sadly that needs some manual configuration for .NET Standard projects. fsprojects/FSharp.TypeProviders.SDK#182 (comment) Duplicate: #534 |
@Thorium But why does it work simply by changing the version from 1.1.38 to 1.1.26 ?? |
Thank you @ScottHutchinson, that totally fixed it for me as well. I see the same thing: After updating my Paket dependencies the build suddenly failed with the same error message as Scott described. I have the Fsc configuration set up in my .fsproj file, but it didn't matter, the build failed anyway. I am on Windows using the latest version of .NET core. |
Created PR to the repo. |
Ran into the same thing (I guess) After trying out other versions looks like v,1,1,37 works, 1.1.38 and up fails to build with the same error. I'm on Win10, dotnet v.2.1.101. |
@AkosLukacs you might be on to something. I just tested with 1.1.37, it works. 1.1.38 doesn't. I'd also like to point out that if you look at the commits, the last CI build before 1.1.38 works, but the CI build for 1.1.38 fails and it has been failing since. I don't know if this is related at all and I can't quite make sense of the logs. but the timing would fit. Could this all be related to the changes to |
Ookay, this is weird. My code is here: https://github.com/AkosLukacs/SQLProvider529 Maybe it helps... |
We can revert the component upgrades if necessary but I hope the real cause behind this will be found. |
Can you test with 1.1.41? |
@Thorium Yes I just tested the 1.1.41 nuget package, and it works fine (design-time in VS Code Ionide, and dotnet build/run). Nice! |
I can also confirm that it works with the latest release. Thank you! Also, the CI builds are working again. So there is a connection... |
Works for me too, thank you! |
Great, I'll close this for now, and try to dig deeper what component is problematic before updating those in the future. |
Description
OS: Windows
Database: Microsoft SQL Server
Program.fs(8,11): error FS3033: The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error: Could not load file or assembly 'System.Data.SqlClient, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Known workarounds
After running the command below, the project builds and runs with either System.Data.SqlClient package version 4.4.0 or 4.4.3.
dotnet add package SQLProvider --version 1.1.26
The text was updated successfully, but these errors were encountered: