- Getting Started
The Nuget packages target two versions of the .NET frameworks: net45 and netstandard1.5. The net45 target allows the driver to be used with the full .NET Framework version 4.5 and later, and the netstandard1.5 target allows the driver to be used with any framework that supports netstandard1.5, which includes .NET Core 1.0.
Nuget is the simplest way to get the driver. There are 5 packages available on nuget.
- MongoDB.Driver: The new driver. It is mostly free of any legacy code and should be used for all new projects. More documentation can be found in the reference guide.
- MongoDB.Driver.Core: The core of the driver and a dependency of MongoDB.Driver. You will probably not use this package directly. More documentation can be found in the reference guide.
- MongoDB.Driver.GridFS: The GridFS package. More documentation can be found in the reference guide.
- MongoDB.Bson: The BSON layer. It is a dependency of MongoDB.Driver.Core. It may be used by itself. More documentation can be found in the reference guide.
- mongocsharpdriver: The compatibility layer for those upgrading from our 1.x series. This should not be used for new projects. More information can be found in the 1.x documentation;
Alternatively, if you’d like to pull down binaries, you can do that from the releases section on our github repository, which contains zip files for each release.
The assembly names mostly correlate strongly with the package names above. For new applications, you’ll add references to
MongoDB.Bson.dll. For those working with legacy applications, you’ll also want to add a reference to