奇怪:类型提供者'ProviderImplementation.WorldBankProvider'报告错误:

时间:2016-06-27 15:47:02

标签: visual-studio-2015 f# f#-data

Visual Studio不时在第一行module MyFile下显示错误。但是,我不使用WorldBankProvider,重建项目后错误总是消失。为什么呢?

  

类型提供程序'ProviderImplementation.WorldBankProvider'报告错误:类型提供程序构造函数抛出异常:类型提供程序使用的类型'FSharp.Data.Runtime.WorldBank.Indicators'未在引用程序集中找到' [| ctxt assembly FSharp.Data,Version = 2.3.0.0,Culture = neutral;

完整的错误消息:

Severity    Code    Description Project File    Line    Suppression State
Error       The type provider 'ProviderImplementation.WorldBankProvider' reported an error: The type provider constructor has thrown an exception: The type 'FSharp.Data.Runtime.WorldBank.Indicators' utilized by a type provider was not found in reference assembly set '[|ctxt assembly FSharp.Data, Version=2.3.0.0, Culture=neutral;
  ctxt assembly HtmlAgilityPack, Version=1.4.9.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a;
  ctxt assembly NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c;
  ctxt assembly mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;
  ctxt assembly FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;
  ctxt assembly System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;
  ctxt assembly System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;
  ctxt assembly System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;
  ctxt assembly System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;
  ctxt assembly System.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;
  ctxt assembly System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;
  ctxt assembly System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;
  ctxt assembly System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|]'. You may be referencing a portable profile which contains fewer types than those needed by the type provider you are using.   crawlerfs   D:\working\myfile.fs    1   

文件中的顶行。

module MyFile
(*
#load "Helper.fs"
*)
open System
open System.Text
open System.Text.RegularExpressions
open System.Data
open System.Data.SqlClient
open System.Threading
//open Microsoft.FSharp.Data.TypeProviders
open Microsoft.FSharp.Linq
open System.Net
open System.IO
open FSharp.Data
open FSharp.Data.HttpRequestHeaders
open BlockingQueueAgent
open HtmlAgilityPack
open System.Configuration
open System.Diagnostics
open NLog

0 个答案:

没有答案