You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]
@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
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]
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.
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 ,
Activity
enricosada commentedon Feb 23, 2017
@ww198643 Type provider require .net standard 2.0.See visualfsharp roadmap for more infoEdited, will not work in 2.0 either, see #16 (comment) below
ed-ilyin commentedon Jun 27, 2017
I'm trying to use this lib in netstandard2.0 preview1 project, but getting error at compile time
enricosada commentedon 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 commentedon Jul 4, 2017
I understand that I cant use type providers when targeting netstandard2.0.
But shouldn't they work when I target net461?
dsyme commentedon 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 commentedon Jul 4, 2017
@larjo The error is different when using .NET SDK 2.0 preview2, see dotnet/fsharp#3303
dsyme commentedon 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 commentedon 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:
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 commentedon 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 commentedon Apr 4, 2018
Do you mean http://github.com/fsharp/FSharp.Data, rather than this set of (old) type providers?
daz10000 commentedon Apr 4, 2018
Ooops - yes ;) didnt notice I was in the wrong project.
dsyme commentedon 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