Hello. I try to work with mongoDB in VS15, for this I downloaded MongoDB.Driver version 2.4.0. I also use GridFS. Also downloaded the latest version from Nuget.
using MongoDB.Driver; using MongoDB.Driver.GridFS; using System.Configuration; namespace _13.Models { public class ComputerContext { MongoClient client; IMongoDatabase database; MongoGridFS gridFS; public ComputerContext() { string connectionString = ConfigurationManager.ConnectionStrings["MongoDb"].ConnectionString; var con = new MongoUrlBuilder(connectionString); client = new MongoClient(connectionString); database = client.GetDatabase(con.DatabaseName); gridFS = new MongoGridFS( new MongoServer( new MongoServerSettings { Server = con.Server }), con.DatabaseName, new MongoGridFSSettings() ); } public IMongoCollection<Computer> Computers { get { return database.GetCollection<Computer>("Computers"); } } public MongoGridFS GridFS { get { return gridFS; } } } } But the problem is that the GridFS namespace is not connected and, accordingly, the compiler curses everything connected with it. I try to do by example from here. Description of work with GridFS