1
我運行在一個奇怪的行爲。在FSI中的C#類 - System.MissingMethodException
我特林使用C#庫:在Neo4jClient
我在FSI代碼如下所示:
#r "Neo4jClient.dll"
#r "Newtonsoft.Json"
open System
open Neo4jClient
// Define your library scripting code here
let client = new GraphClient(new Uri("http://localhost:7474/db/data"))
client.Connect()
,並導致以下錯誤:
System.MissingMethodException: Method not found: 'Void Newtonsoft.Json.JsonReader.set_DateParseHandling(Newtonsoft.Json.DateParseHandling)'.
at Neo4jClient.Serialization.CustomJsonDeserializer.Deserialize[T](String content)
at Neo4jClient.HttpContentExtensions.ReadAsJson[T](HttpContent content, IEnumerable`1 jsonConverters) in c:\TeamCity\buildAgent\work\5bae2aa9bce99f44\Neo4jClient\HttpContentExtensions.cs:line 20
at Neo4jClient.GraphClient.Connect() in c:\TeamCity\buildAgent\work\5bae2aa9bce99f44\Neo4jClient\GraphClient.cs:line 188
at <StartupCode$FSI_0013>[email protected]() in C:\Users\Mattia\Documents\Visual Studio 2012\Projects\GenChi\GenChiSnooper\Script.fsx:line 12
然而,如果作爲F#應用程序執行,則相同的代碼可以正常運行。
open System
open Neo4jClient
[<EntryPoint>]
let main argv =
let client = new GraphClient(new Uri("http://localhost:7474/db/data"))
client.Connect();
printfn "Went through..."
printfn "%A" argv
0 // return an integer exit code
我不確定這個問題是否是庫特定的。 我的問題是:是否有一些特定的黑客與FSI使用C#庫?
Tnx。
你是否也引用了fsi中的json dll? –
是的,我做到了。我也試圖降級json dll – NoIdeaHowToFixThis
我認爲缺少的「dll」是json的錯字? –