'System.FormatException' occurred in MongoDB.Bson.dll when trying to use Builders<BsonDocument>

544 views
Skip to first unread message

Ross McTague

unread,
May 20, 2015, 11:15:08 AM5/20/15
to mongodb...@googlegroups.com

I have am able to query and insert new documents just fine, however, when I try to build an update document I get an error:

A first chance exception of type 'System.FormatException' occurred in MongoDB.Bson.dll

I an using the example straight from the site

var update = Builders<BsonDocument>.Update.Set("i", 100);

yet I STILL get the same error. 

I am using the 2.0 driver with VS2013, the driver was downloaded using NuGet. Anyone have a suggestion as to why this is happening?

Craig Wilson

unread,
May 20, 2015, 11:40:33 AM5/20/15
to mongodb...@googlegroups.com
Hi Ross,

Sorry you are having issues. However, that line of code works for me all by itself and doesn't generate an exception (and we have tests doing just that). Hence, a more complete example of the problem is necessary. Perhaps you could provide a method that exemplifies the problem so we can try and reproduce.  In addition, could we have the stacktrace of the exception? 

Craig
Reply all
Reply to author
Forward
0 new messages