我有一个 F# 库项目(非便携式库),代码如下:
let db = new ApiaryProvider<"themoviedb">("http://api.themoviedb.org")
db.AddQueryParam("api_key", TmdbApiKey)
let test =
let movie = db.Movie.GetMovie("550")
let creds = movie.Credits()
creds
不幸的是,当我尝试构建它时,我得到了错误:
C:\Users\Andy\Documents\Programming\Projects\MovieMediaManager\MovieMediaManagerLib\
Library1.fs(73,19):
error FS3033: The type provider 'ApiaryProvider.ProviderImplementation.ApiaryProvider'
reported an error in the context of provided type
'ApiaryProvider.ApiaryProvider,ApiName="themoviedb"+Movie3', member 'Credits'.
The error: Could not load file or assembly 'FSharp.Data.DesignTime, Version=2.0.7.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find
the file specified.
在线上:
let credits = movie.Credits()
我正在使用 ApiaryProvider 1.0.1。FSharp.Data.DesignTime dll 位于此目录的 nuget 包文件中:
\packages\ApiaryProvider.1.0.1\lib\net40
我在这里读到了这个问题: FSharp.Data.DesignTime .NET 4.5 only?
您可以删除该引用并且它应该可以工作,但这提到了 FSharp.Data 并且它应该在新的 nuget 包中得到修复。
难道我做错了什么?我是否需要签出源代码并手动删除引用并重建?