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

When support for .net core? #16

Closed
ZeeLyn opened this issue Dec 1, 2016 · 12 comments
Closed

When support for .net core? #16

ZeeLyn opened this issue Dec 1, 2016 · 12 comments

Comments

@ZeeLyn
Copy link

ZeeLyn commented Dec 1, 2016

When support for .net core?

@enricosada
Copy link

enricosada commented Feb 23, 2017

@ww198643 Type provider require .net standard 2.0.

See visualfsharp roadmap for more info

Edited, will not work in 2.0 either, see #16 (comment) below

@ed-ilyin
Copy link

I'm trying to use this lib in netstandard2.0 preview1 project, but getting error at compile time

FSC : error FS3031: The type provider 'C:\Users\edil\.nuget\packages\fsharp.data.typeproviders\5.0.0.2\lib\net40\FSharp.Data.TypeProviders.dll' reported an error: Assembly attribute 'TypeProviderAssemblyAttribute' refers to a designer assembly 'FSharp.Data.TypeProviders' which cannot be loaded or doesn't exist. Could not load file or assembly 'FSharp.Data.TypeProviders, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified. [C:\Users\edil\git\MyProject.fsproj]

@enricosada
Copy link

enricosada commented Jun 27, 2017

Type providers doesnt work in 2.0 either.
VF# team updated the roadmap and excluded type providers for 2.0, see dotnet/fsharp#3069 for more info

@larjo
Copy link

larjo commented Jul 4, 2017

I understand that I cant use type providers when targeting netstandard2.0.

But shouldn't they work when I target net461?


> dotnet --version
1.0.4

> gc .\src\library\library.fsproj | select -index 2
<TargetFramework>net461</TargetFramework>

> dotnet add .\src\library\library.fsproj package FSharp.Data.TypeProviders
> dotnet restore
> dotnet build
...
 error FS3031: The type provider 'C:\Users\lbr606\.nuget\packages\fsharp.data.typeproviders\5.0.0.2\lib\net40\FSharp.Data.TypeProviders.dll' reported an error: Assembly attribute 'TypeProviderAssemblyAttribute' refers to a designer assembly 'FSharp.Data.TypeProviders' which cannot be loaded or doesn't exist. Could not load file or assembly 'FSharp.Data.TypeProviders, Culture=neutral, PublicKeyToken=null'.

@dsyme
Copy link
Contributor

dsyme commented Jul 4, 2017

@larjo Please add a bug at http://github.com/Microsoft/visualfsharp. This is likely to be a limitation of using the F# compiler when executing on .NET Core.

@dsyme
Copy link
Contributor

dsyme commented Jul 4, 2017

@larjo The error is different when using .NET SDK 2.0 preview2, see dotnet/fsharp#3303

@dsyme
Copy link
Contributor

dsyme commented Jul 4, 2017

@larjo We have looked into this. You can use type providers with the new project file format when targeting net461, you just need to either compile using "msbuild", or apply the second workaround listed in dotnet/fsharp#3303

@gfritz
Copy link

gfritz commented Jan 3, 2018

I tried the workaround documented in this dotnet/fsharp#3303 (comment) with WsdlService. The approach in that comment still fails for me, however the error is different from the other errors in that issue:

FSC : error FS2024: Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). [C:\git\tp-tests\wsdlserviceapp\wsdlserviceapp.fsproj]

image

Is FS2024 happening primarily because the Type Providers in FSharp.Data.TypeProviders are not "cross targeting" like in the linked comment? I could not find a way to determine if they were or were not. I have a test repo https://github.com/gfritz/wsdlserviceapp and a README with steps and screenshots.

@daz10000
Copy link

daz10000 commented Apr 3, 2018

Is there any update on this? - we have been using FSharp.Data extensively with dotnet core (mainly the type providers like CSV and XML provider) and then using the magic workaround dotnet/fsharp#3303 to keep the tooling happy. It all works, but only downside is lots of warnings every time you run the executable. Would be great to get a clean FSharp.Data build on dotnet core ,

Darren

:\src\DemGslc\src\DemGslc\DemGslc.fsproj : warning NU1701: Package 'FSharp.Data 2.4.5' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.

@dsyme
Copy link
Contributor

dsyme commented Apr 4, 2018

Is there any update on this? - we have been using FSharp.Data extensively with dotnet core (mainly the type providers like CSV and XML provider) and then using the magic workaround dotnet/fsharp#3303 to keep the tooling happy. It all works, but only downside is lots of warnings every time you run the executable. Would be great to get a clean FSharp.Data build on dotnet core ,

Do you mean http://github.com/fsharp/FSharp.Data, rather than this set of (old) type providers?

@daz10000
Copy link

daz10000 commented Apr 4, 2018

Ooops - yes ;) didnt notice I was in the wrong project.

@dsyme
Copy link
Contributor

dsyme commented Nov 20, 2021

Note this is a very old collection of type providers that are Windows-specific and .NET Framework-specific. For up-to-date type providers see https://fsharp.org/guides/data-access/

For WSDL see https://github.com/fsprojects/FSharp.Data.WsdlProvider for a more recent provider, also https://github.com/fsprojects/SwaggerProvider

@dsyme dsyme closed this as completed Nov 20, 2021
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

7 participants