Bson Type Provider problem

已查看 25 次
跳至第一个未读帖子

simon lomax

未读,
2016年11月29日 04:50:072016/11/29
收件人 F# Discussions
I'm trying to use the Bson type provider to do some work with a MongoDB database.

I've created the bson files by using:- 
mongodump /host:starbug /db:Logger /excludeCollection:logs /excludeCollection:tokens --out data 

I've built the type provider from the source from https://github.com/visemet/FSharp.Data.Bson

I've created the following F# script file :

#I "../../FSharp.Data.Bson/bin" // The path to type provider DLL's created from the above build process


#r "FSharp.Data.Bson.Runtime.dll"
#r "FSharp.Data.Bson.dll"
#r "MongoDB.Bson.dll"


open
BsonProvider


type
AccessLogs = BsonProvider<"./data/Logger/access_logs.bson"> // The location of the Bson files created from the mongodump command
type
SQLiteLogs = BsonProvider<"./data/Logger/sqlite_logs.bson">


let accessLogs
= AccessLogs.GetSamples().[0]


But the last line is showing the following error in VS 2013

The type provider 'BsonProvider.ProviderImplementation.BsonProvider' reported an error in the context of provided type 'BsonProvider.BsonProvider,Path="./data/Logger/access_logs.bson"', member 'GetSamples'. 
The error: Could not load file or assembly 'FSharp.Data.Bson.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. 
The system cannot find the file specified. C:\Development\fsharp-scripts\Logger\AccessSqliteStats.fsx

Any idea whats wrong?


Isaac Abraham

未读,
2016年11月30日 14:35:462016/11/30
收件人 simon lomax、F# Discussions

That repo hasn’t been updated in a couple of years but you might yet creating an issue on it in the hope that the author answers it.

 

I can’t see anything specifically wrong from what you’ve supplied.

--
--
To post, send email to fsharp-o...@googlegroups.com
To unsubscribe, send email to
fsharp-opensou...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/fsharp-opensource
---
You received this message because you are subscribed to the Google Groups "F# Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fsharp-opensou...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
已删除帖子

simon lomax

未读,
2016年12月1日 05:58:002016/12/1
收件人 F# Discussions、simax...@gmail.com
Thanks Isaac, I noticed the repo hadn't been worked for a while, it was a long shot.

In the end I decided to export my data from Mongo into Json files and used the Json Type Provider to explore the data that way.
回复全部
回复作者
转发
0 个新帖子