-
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
.NET Standard 2.0 support #456
Conversation
# Conflicts: # src/SQLProvider/SqlRuntime.DataContext.fs
Hmm. This build gives me a Repro:
At this point there is a red squiggle under 'Sql', so I looked at the example and added a Then,
Any tip for how I can diagnose this further? Just for confirmation, commenting out the |
What environment you are on, Win, Mac or Ubuntu? I have read something about a StackOverflowException bug in fcs.exe when compiling .net core, but don't know a lot about it. |
Win10 x64, .NET Core 2.0, .NET Framework 4.7.
No, same StackOverflowException.
Possible. I can compile other f# .NET Core projects though, so if that's the bug it isn't total. |
StackOverflowException bug may have been fixed a few minutes ago, and it seems it was specific to TP assembly loading. As soon as I can install a fresh CI build, I'll check if it solved my problem. |
Now there is example at https://github.com/fsprojects/SQLProvider/tree/netstandard/tests/SqlProvider.Core.Tests/Postgres Hmm. I don't know if we should modify the dynamic reference loading, as database connection libraries seem to have more and more references. Currently we look just from the resolution folder, but what if there are multiple files to load from different NuGet packages, and loading one dll with |
Tested the old 4.5.1 version thoroughly, won't break anything, so ok to merge. |
Ping @piaste can you try the latest version? No matter what F# compiler version, I think I got the issue solved by using a different assembly loading technique. |
Cloning the
Just in case, the 1.1.12-alpha-8 version on nuget still has the stack overflow error (and I installed the latest nightly too). |
Npgsql.dll is depending on System.Threading.Tasks.Extensions.dll and System.Data.Common.dll so they have to be present. In the example I have a PreBuildEvent (in the bottom of fsproj-file) that copies the two files from their NuGet packages to ResolutionPath (temp) that is given as a static parameter to SqlDataProvider type constructor. Edit: Also run Paket restores described above before build to get the dlls. The |
Hi @Thorium, I implemented the dotnet feature as well, but I also get the StackOverflowException. I tried to add the preBuild parameters but that didn't help. I have the following setup: Win10 x64, .NET Core 2.0, .NET Framework 4.7. MS SQL Server 2008 nuget SqlProvider 1.1.12-alpha8 My fsproj file looks like that: Any ideas how to solve my issue? |
@tforkmann I assume you are using MsSql. Can you get the example to work: |
@piaste discovery of dlls is improved in the latest alpha. But copying those to ref-path is still needed. The default .Net Core way to discovery reference assemblies from Nuget packages when loading dlls with reflection is not working very well with compiler plugins like Type Providers. |
MySQL Core example is pending a solution for this: https://bugs.mysql.com/bug.php?id=88016 Edit: ...and GetSchema() is not supported by .NET Core version of MySql.Data.dll so fixing the security levels is not enough anyways. |
Update: the current |
Great!
That should cover most of testing and production cases for .NET Core. |
This branch is released as a test version 1.1.12-alpha5 in the NuGet.org.
Current possible issues:
More info: http://fsprojects.github.io/SQLProvider/core/netstandard.html
This contains #451 . Ping #426 #303 : We need more testing.