Skip to content
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

dotnetcore support? #426

Closed
hveiras opened this issue Jun 3, 2017 · 9 comments
Closed

dotnetcore support? #426

hveiras opened this issue Jun 3, 2017 · 9 comments

Comments

@hveiras
Copy link

hveiras commented Jun 3, 2017

Hi,

Sorry to file this as an issue I didn't find an email or other way to communicate.

Can this provider be used with net core?

I'm getting this error when adding the package

error: Package SQLProvider 1.1.3 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package SQLProvider 1.1.3 supports: net (.NETFramework,Version=v0.0)
error: One or more packages are incompatible with .NETCoreApp,Version=v1.1.

@ForNeVeR
Copy link
Contributor

ForNeVeR commented Jun 3, 2017

Hello. See #303

I don't think that .NET Core supports type providers currently. They will be supported after .NET Core 2.0 release.

@Thorium
Copy link
Member

Thorium commented Jun 3, 2017

This is erasing typeprovider so in theory it could be done already with 1.6 by excluding providedtypes.fs and sqldesigntime.fs from the source code project. However this relies heavily on reflection and System.Data and other things that are missing some APIs in .NET Core. So that could be done with quite a lot of work. But if .NET Core 2.0 will support referencing old .NET libraries, and it will be released this summer, what is the point of now converting anything to .NET core?

@wklm
Copy link

wklm commented Jun 9, 2017

Can I simply compile it to dll and include into my netcore project?

@Thorium
Copy link
Member

Thorium commented Jun 9, 2017

I think so, but I also think there is a lot of things to modify, and intellisense and tooling for FSharp .NET Standard is not yet good enough.
I made initial branch, you can try this:
https://github.com/fsprojects/SQLProvider/tree/netstandard
and \src\SQLProvider.Standard\

@dsyme
Copy link
Contributor

dsyme commented Jul 4, 2017

You should first adjust the type provider to be a cross-targeting type provider

Then see dotnet/fsharp#3303

@charlesroddie
Copy link

charlesroddie commented Jun 20, 2018

Can we reopen this thread please? I dont believe that .Net Standard or Core support is finished. As shown by this comment:

@Thorium #547 (comment) To use type provider with .NET Standard you have to use compatible fsharp compiler and do the compilation with .Net451 version of SQLProvider.dll. On runtime you can use the .NET Standard dll.

@jsauer @monkieboy

@Thorium
Copy link
Member

Thorium commented Jun 20, 2018

@charlesroddie this is by design of the TypeProviders.
So rather that is a task for fsprojects/FSharp.TypeProviders.SDK or Microsoft/visualfsharp.

SQLProvider uses those and there is no point of doing our custom implementations.

@dsyme
Copy link
Contributor

dsyme commented Sep 11, 2018

@Thorium I'd like to help you get the .NET Core 2.0 tooling type provider completed. Has there been an attempt to do this here so far based on recent updates to the TPSDK and .NET Core F# compiler?

@Thorium
Copy link
Member

Thorium commented Sep 11, 2018

We are using the latest TPSDK (ProvidedTypes.fs).

However I haven't followed the recent .NET Core development, so I don't know if e.g. FscToolPath is still needed and do you still need a .NET framework version of typeprovider dll to compile .NET Core.

The help documents reflect the situation about half year ago. People seem in general be able to use SQLProvider with .NET Core 2.0 even though the experience is not as out-of-the-box as .NET tends to be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants