[英]F# error FS0039: The type 'XmlProvider' is not defined
Looked at these for a couple solutions--but nothing works 看着这些有几个解决方案-但没有任何效果
The type 'XmlProvider' is not defined 未定义类型“ XmlProvider”
F# Data New type provider library F#Data新型提供程序库
F# Data: XML Type Provider F#数据:XML类型提供程序
open FSharp.Data
type XMLcountries = XmlProvider<"http://api.worldbank.org/country">
let sampleCountries = XMLcountries.GetSample()
let sampleCountries' = XMLcountries.Load("http://api.worldbank.org/country")
When using the interactive window, I get F# error FS0039: The type 'XmlProvider' is not defined. 使用交互式窗口时,出现F#错误FS0039:未定义类型'XmlProvider'。 Is there a better package/library to use XML provider(and JSON too).
是否有更好的包/库来使用XML提供程序(以及JSON)。
I have updated FSharp.Data to version 2.3.1 我已经更新了FSharp.Data到2.3.1版本
I added open FSharp.Data.TypeProviders to see if that would work. 我添加了打开的FSharp.Data.TypeProviders来查看是否可行。 Still same error.
还是一样的错误。
This is extremely frustrating. 这非常令人沮丧。
Are you sure you have looked at F# Data: XML Type Provider ? 您确定您已查看过F#Data:XML类型提供程序吗? Because at the very beginning it says:
因为一开始它说:
#r "../../../bin/FSharp.Data.dll"
#r "System.Xml.Linq.dll"
open FSharp.Data
So you have a couple of options, if you don't want to install FSlab, the second one is the easiest for you. 因此,您有两个选择,如果您不想安装FSlab,那么第二个选择对您来说最简单。 You obviously have to adjust the path to match your environment.
显然,您必须调整路径以匹配您的环境。
#load @"..\\..\\FSLAB\\packages\\FSLAB\\FsLab.fsx"
#r @"..\\..\\FSLAB\\packages\\FSharp.Data\\lib\\net40\\FSharp.Data.dll"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.