-
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 Core/.NET Standard support (Tracking issue) #575
Comments
.NET Framework supported databases:
.NET Core:
|
I would guess (MSSQL, Postgres, MySQL) would be the most popular and worth investigating first. "Support" I would take to mean: install a nuget package into a project, get typed access to the db in vs2017/vsmac/ vscode, and be able to run run locally or in asp.net/.net core/azure functions. "Support with workarounds" would require additional documented steps. Edit: sql type provider for MSSQL using .net core is at the "support with workarounds" stage. |
Documentation running on .NET Core and .NET Standard: |
Thanks. @j-sauer @monkieboy if the instructions in the link are not good then please leave a separate issue here. |
Hey, not sure where to put this... I tried out Firebird driver with .net core. Everything seems fine. Anything else needed to get those checks ticked? :) |
@jlogar great! Did you use Windows, Mac or Ubuntu? |
Oh, sorry, was sloppy with that. Was using Windows... Went on to create a repo to make it repeatable. |
If I understand correctly, it is currently still necessary to have mono installed to compile projects for .net core. At least currently the .NET Core page (https://github.com/fsprojects/SQLProvider/tree/master/tests/SqlProvider.Core.Tests) still specifies:
As it currently stands at least, just trying to compile / run it on .NET Core makes it fail with:
Is this particular issue currently being tracked? I find it a big hurdle to get started with SqlProviders on .NET Core, and it seems to be a 'hack' that has been present for well over a year. Is there a particular reason why this must be handled like this? |
As far as I know, this is a limitation of all typeproviders: if you want design time intellisense (which is the main benefit using a typeprovider in the first place), you need Mono. Or has this changed recently? |
This depends on how Intellisense is used, if it is done by a project like IfSharp or with the VS Code F# Language Server addon then Intellisense is performed by dotnet core as well. You are probably right though that this might be an actual issue with compatability with .NET core though, as I cannot get it to compile at all on .NET Core even with trying to add the fsc tool info. It doesn't seem to work for Sqlite or Npgsql, and surprisingly it is not the actual type provider stage that fails but only when the types are referenced (i.e. I get intellisense for the tablename, but it has issues compiling it). Other type providers do work on dotnet core I believe, as I had used the CSV type provider within IfSharp. |
@Thorium @dsyme seemingly this is an issue related to the default behaviour of types. There are a few locations where I've been trying to somewhat follow the |
After the latest update I'm happy to say that postgresql works targeting .NET Core on Linux. SQLite semi works, it doesn't return errors during compilation and actually finds the tables, but the tables seem to weirdly not have any columns. It would be nice to track the support for completion in ionide F#, the F# language server and IFSharp. It seems to work with ionide F#, but I have reported an issue for the F# language server (fsprojects/fsharp-language-server#52). I'm not entirely sure about IFSharp, but I assume it has similar issues as it did with other type providers (probably this: fsprojects/IfSharp#213). I think especially IFSharp and F# language server are important going forward, as they both help discoverability of the language. |
@rudihorn a few questions with your SQLite:
|
@Thorium I should be using |
I'm not sure whether this is relevant, but when using:
I need to apply this workaround: fsprojects/FSharp.TypeProviders.SDK#244 (comment) As a general aside, support in Ionide tends to be good for me with recent MsSql and Sqlite providers and the |
Hey all 👋 It seems like things have improved drastically on .NET Core 2 support (2.2 to be specific) for PostgreSQL (Npgsql). I created a simple project to test this out:
DB SQL:
This seems to build and run correctly for me on Mac OS, with no additional setup required. I'm fairly new to the F# scene, so please forgive me if I've missed something obvious. However, assuming things do truly work out-the-box these days, it would be very worthwhile to update the docs accordingly, to encourage more adoption of this package. I know from my own experience that the extra setup described in the tests and docs can be off-putting for new F# developers, and the perception around the web is that it requires a bit of setup to get working too. If someone else can confirm that this now works out-the-box for the above scenario, I'm happy to contribute to updated documentation where possible. Thanks for all the hard work! 🙂 |
I can confirm @allistercsmith experience, when I tried with .NET6.0 yesterday myself except for one extra detail that I had to do to make it work: specify the |
I'm creating a tracking issue to help assess the status of .NET Core/.NET Standard support for SQLprovider. If people can help me define what we need to assess that would be great.
Below I've partially listed some of the scenarios. The matrix is unforuntately large because of the variety of compile-time tools that may end up hosting the type provider TPDTC, but hey.
If there is a
?
it means I don't know what is the highest priority thing to assess for that scenario.What I'm really looking for is help to know what 1 or 2 scenarios we should aim to "complete" next
The text was updated successfully, but these errors were encountered: