Skip to content

Releases: mongodb/mongo-csharp-driver

2.2.0-rc0

18 Nov 03:26
Compare
Choose a tag to compare
2.2.0-rc0 Pre-release
Pre-release

.NET Driver Version 2.2.0-rc0 Release Notes

(Preliminary)
This is a release candidate. It is not recommended for production use.

This is a minor release which supports all MongoDB server versions from 2.4 through the upcoming
3.2 release.

An online version of these release notes is available at:

https://github.com/mongodb/mongo-csharp-driver/blob/master/Release%20Notes/Release%20Notes%20v2.2.0.md

The full list of JIRA issues resolved in this release is available at:

https://jira.mongodb.org/issues/?jql=project%20%3D%20CSHARP%20AND%20status%20in%20(Resolved%2C%20Closed)%20AND%20fixVersion%20%3D%202.2%20ORDER%20BY%20key%20ASC

Documentation on the .NET driver can be found at:

http://mongodb.github.io/mongo-csharp-driver/

New Features

Notable new features are listed below. For a full list, see the list of JIRA issues linked above.

Sync API

The 2.0 and 2.1 versions of the .NET driver featured a new async-only API. Some users gave us feedback
that they wanted a choice whether to use a sync or an async API. Version 2.2 introduces sync versions
of every async method.

Support for server 3.2

  • Support for bypassing document validation for write operations on collections where document validation
    has been enabled
  • Support for write concern for FindAndModify methods
  • Support for read concern
  • Builder support for new aggregation stages and new accumulators in $group stage
  • Support for version 3 text indexes

Upgrading

There are no known backwards breaking changes in this release.

1.11.0-rc0

18 Nov 02:34
Compare
Choose a tag to compare
1.11.0-rc0 Pre-release
Pre-release

C#/.NET Driver Version 1.11.0-rc0 Release Notes (PRE_RELEASE)

This is a major release supporting mongodb 3.2.

It also fixes some issues reported since 1.10.1 was released.

An online version of these release notes is available at:

https://github.com/mongodb/mongo-csharp-driver/blob/v1.x/Release%20Notes/Release%20Notes%20v1.11.md

Documentation on the C# driver can be found at:

http://www.mongodb.org/display/DOCS/CSharp+Language+Center
http://api.mongodb.org/csharp/current/

General Changes

The 1.x releases will be the last non-bug fix release supporting .NET 3.5.

Compatibility Changes

There were no intentional backwards breaking changes. If you come across any,
please inform us as soon as possible by email dotnetdriver@mongodb.com or by reporting
an issue at jira.mongodb.com.

2.1.1

11 Nov 16:14
Compare
Choose a tag to compare

.NET Driver Version 2.1.1 Release Notes

This is a minor release which supports all MongoDB server versions since 2.4.

An online version of these release notes is available at:

https://github.com/mongodb/mongo-csharp-driver/blob/v2.1.x/Release%20Notes/Release%20Notes%20v2.1.1.md

The full list of JIRA issues resolved in this release is available at:

https://jira.mongodb.org/browse/CSHARP-1468?filter=18754

Documentation on the .NET driver can be found at:

http://mongodb.github.io/mongo-csharp-driver/

Upgrading

There are no known backwards breaking changes in this release.

2.0.2

11 Nov 16:11
Compare
Choose a tag to compare

.NET Driver Version 2.0.2 Release Notes

This is a patch release which fixes some issues reported since 2.0.1 was released. It is a recommended
upgrade for anyone using 2.0.

An online version of these release notes is available at:

https://github.com/mongodb/mongo-csharp-driver/blob/v2.0.x/Release%20Notes/Release%20Notes%20v2.0.2.md

The full list of JIRA issues resolved in this release is available at:

https://jira.mongodb.org/browse/CSHARP-1462?filter=18755

Documentation on the .NET driver can be found at:

http://mongodb.github.io/mongo-csharp-driver/

Compatibility Changes

There were no intentional backwards breaking changes.

2.1.0

19 Oct 17:22
Compare
Choose a tag to compare

.NET Driver Version 2.1.0 Release Notes

This is a minor release which supports all MongoDB server versions since 2.4.

An online version of these release notes is available at:

https://github.com/mongodb/mongo-csharp-driver/blob/master/Release%20Notes/Release%20Notes%20v2.1.0.md

The full list of JIRA issues resolved in this release is available at:

https://jira.mongodb.org/issues/?filter=18283

Documentation on the .NET driver can be found at:

http://mongodb.github.io/mongo-csharp-driver/

New Features

Notable new features are listed below. For a full list, see the full list of JIRA issues linked above.

GridFS

CSHARP-1191 - GridFS support has been implemented.

LINQ

CSHARP-935 LINQ support has been rewritten and now targets the aggregation framework. It is a more natural translation and enables many features of LINQ that were previously not able to be translated.

Simply use the new AsQueryable method to work with LINQ.

Eventing

CSHARP-1374 - An eventing API has been added allowing a user to subscribe to one or more events from the core driver for insight into server discovery, server selection, connection pooling, and commands.

Upgrading

There are no known backwards breaking changes in this release.

1.10.1

12 Aug 15:13
Compare
Choose a tag to compare

C#/.NET Driver Version 1.10.1 Release Notes

This is a minor release and contains no API changes.

It also fixes some issues reported since 1.10.0 was released.

An online version of these release notes is available at:

https://github.com/mongodb/mongo-csharp-driver/blob/v1.x/Release%20Notes/Release%20Notes%20v1.10.1.md

Documentation on the C# driver can be found at:

http://www.mongodb.org/display/DOCS/CSharp+Language+Center
http://api.mongodb.org/csharp/current/

General Changes

The 1.x releases will be the last non-bug fix release supporting .NET 3.5.

The issues fixed in 1.10.1 are:

CSHARP-1351 - ObjectSerializer should not be dependent on the order of the _t and _v elements.

Compatibility Changes

There were no intentional backwards breaking changes. If you come across any,
please inform us as soon as possible by email dotnetdriver@mongodb.com or by reporting
an issue at jira.mongodb.com.

2.0.1

08 Jun 16:31
Compare
Choose a tag to compare

.NET Driver Version 2.0.1 Release Notes

This is a patch release which fixes some issues reported since 2.0 was released. It is a recommended
upgrade for anyone using 2.0.

An online version of these release notes is available at:

https://github.com/mongodb/mongo-csharp-driver/blob/v2.0.x/Release%20Notes/Release%20Notes%20v2.0.1.md

The full list of JIRA issues resolved in this release is available at:

https://jira.mongodb.org/issues/?filter=17849

Documentation on the .NET driver can be found at:

http://mongodb.github.io/mongo-csharp-driver/

General Changes

The key issues fixed in 2.0.1 are:

  • CSHARP-1264 WaitQueueSize now properly configures the server selection wait queue.
  • CSHARP-1280 Deserializing fails if a document contains unmapped field which name starts with the same name as currently mapped class property.
  • CSHARP-1265 Update variants allow sending empty documents as update statements, which results in a replacement.

Compatibility Changes

There were no intentional backwards breaking changes. If you come across any,
please inform us as soon as possible by email dotnetdriver@mongodb.com or by reporting
an issue at jira.mongodb.com.

2.0.0

02 Apr 14:39
Compare
Choose a tag to compare

.NET Driver Version 2.0.0 Release Notes

This is a major release which supports all MongoDB server versions since 2.4.

An online version of these release notes is available at:

https://github.com/mongodb/mongo-csharp-driver/blob/master/Release%20Notes/Release%20Notes%20v2.0.0.md

The full list of JIRA issues resolved in this release is available at:

https://jira.mongodb.org/issues/?jql=project%20%3D%20CSHARP%20AND%20fixVersion%20%3D%202.0%20ORDER%20BY%20key%20ASC

Documentation on the .NET driver can be found at:

http://mongodb.github.io/mongo-csharp-driver/

New Features

Notable new features are listed below. For a full list, see the full list of JIRA issues linked above.

Async

As has been requested for a while now, the driver now offers a full async stack. Since it uses Tasks, it is fully usable with async and await.

While we offer a mostly backwards-compatible sync API, it is calling into the async stack underneath. Until you are ready to move to async, you should measure against the 1.x versions to ensure performance regressions don't enter your codebase.

All new applications should utilize the New API.

New API

Because of our async nature, we have rebuilt our entire API. The new API is accessible via MongoClient.GetDatabase.

  • Interfaces are used (IMongoClient, IMongoDatabase, IMongoCollection<TDocument>) to support easier testing.

  • A fluent Find API is available with full support for expression trees including projections.

    var names = await db.GetCollection<Person>("people")
        .Find(x => x.FirstName == "Jack")
        .SortBy(x => x.Age)
        .Project(x => x.FirstName + " " + x.LastName)
        .ToListAsync();
  • A fluent Aggregation API is available with mostly-full support for expression trees.

    var totalAgeByLastName = await db.GetCollection<Person>("people")
        .Aggregate()
        .Match(x => x.FirstName == "Jack")
        .GroupBy(x => x.LastName, g => new { _id = g.Key, TotalAge = g.Sum(x => x.Age)})
        .ToListAsync();
  • Support for dynamic.

    var person = new ExpandoObject();
    person.FirstName = "Jane";
    person.Age = 12;
    person.PetNames = new List<dynamic> { "Sherlock", "Watson" }
    await db.GetCollection<dynamic>("people").InsertOneAsync(person);

Upgrading

As 2.0 is a major revision, there are some breaking changes when coming from the 1.x assemblies. We've tried our best to mitigate those breaking changes, but some were inevitable. These changes may not affect everyone, but take a moment to review the list of known changes below:

System Requirements

  • .NET 3.5 and .NET 4.0 are no longer supported. If you still must use these platforms, the 1.x series of the driver will continue to be developed.
  • CSHARP-952: We've removed support for partially trusted callers.

Packaging

  • The nuget package mongocsharpdriver now includes the legacy driver. It depends on 3 new nuget packages, MongoDB.Bson, MongoDB.Driver.Core, and MongoDB.Driver. MongoDB.Driver is the replacement for mongocsharpdriver.
  • CSHARP-616: We are no longer strong naming our assemblies. Our previous strong naming was signed with a key in our public repository. This did nothing other than satisfy certain tools. If you need MongoDB assemblies to be strongly named, it is relatively straight-forward to build the assemblies yourself.

BSON

  • CSHARP-933: Improved the BSON Serializer infrastructure. Anyone who has written a custom serializer will be affected by this. The changes are minor, but were necessary to support dynamic serializers as well as offering great speed improvements and improved memory management.
  • Certain methods, such as BsonMemberMap.SetRepresentation have been removed. The proper way to set a representation, for instance, would be to use SetSerializer and configure the serializer with the appropriate representation.
  • CSHARP-939: Dynamic DictionaryRepresentation has been removed. Its intent was to store, in some manner, anything in a .NET dictionary. In practice, this leads to the same values getting stored in different ways depending on factors such as a "." inside the key name. We made the decision to eliminate this variability. This means that documents that used to serialize correctly may start throwing a BsonSerializationException with a message indicating the key must be a valid string. CSHARP-1165 has a solution to this problem. It should be noted that we will continue to read these disparate representations without error.

Driver

  • CSHARP-979: MongoConnectionStringBuilder has been removed. Use the documented mongodb connection string format and/or MongoUrlBuilder.

  • MongoServer is a deprecated class. Anyone using MongoClient.GetServer() will encounter a deprecation warning and, depending on how your build is setup, may receive an error. It is still safe to use this API until your code is ported to the new API. *Note that this API requires the use of the mongocsharpdriver to include the legacy API.

  • CSHARP-1043 and CSHARP-1044: ReadPreference and WriteConcern were rewritten. These classes are now immutable. Any current application code that sets values on these classes will no longer function. Instead, you should use the With method to alter a ReadPreference or WriteConcern.

    var writeConcern = myCurrentWriteConcern.With(journal: true);

1.10.0

29 Jan 16:40
Compare
Choose a tag to compare

C#/.NET Driver Version 1.10 Release Notes

This is a minor release which is fully compatible with server version 3.0 and fully supports
the new features introduced by server version 3.0.

It also fixes some issues reported since 1.9.2 was released.

An online version of these release notes is available at:

https://github.com/mongodb/mongo-csharp-driver/blob/v1.x/Release%20Notes/Release%20Notes%20v1.10.md

The full list of JIRA issues resolved in this release is available at:

https://jira.mongodb.org/issues/?filter=16411

Documentation on the C# driver can be found at:

http://www.mongodb.org/display/DOCS/CSharp+Language+Center
http://api.mongodb.org/csharp/current/

General Changes

The 1.x releases will be the last non-bug fix release supporting .NET 3.5.

The issues fixed in 1.10 are:

  • Support for changes in server 3.0
  • Support SCRAM-SHA1 authentication
  • Deprecate classes, properties and methods that will be removed in version 2.0
  • other minor fixes (see JIRA tickets)

Note about SCRAM-SHA1 authenticaton

Starting with the MongoDB 3.0 release, the SCRAM-SHA1 authentication protocol is supported. By
itself, this will not cause any compatibility issues. However, before updating the server's
authentication schema such that the MONGODB-CR protocol is no longer available, you must
replace any calls to:

MongoCredential.CreateMongoCRCredential(...)

with calls to:

MongoCredential.CreateCredential(...)

Compatibility Changes

There were no intentional backwards breaking changes. If you come across any,
please inform us as soon as possible by email dotnetdriver@mongodb.com or by reporting
an issue at jira.mongodb.com.

1.9.2

30 Jun 13:55
Compare
Choose a tag to compare

C#/.NET Driver Version 1.9.2 Release Notes

This is a minor release which fixes some issues reported since 1.9.1 was released. It is a recommended
upgrade for anyone using 1.9.1.

An online version of these release notes is available at:

https://github.com/mongodb/mongo-csharp-driver/blob/v1.x/Release%20Notes/Release%20Notes%20v1.9.2.md

The full list of JIRA issues resolved in this release is available at:

https://jira.mongodb.org/issues/?filter=15440

Documentation on the C# driver can be found at:

http://www.mongodb.org/display/DOCS/CSharp+Language+Center
http://api.mongodb.org/csharp/current/

General Changes

The 1.9.x releases will be the last non-bug fix release supporting .NET 3.5.

The issues fixed in 1.9.2 are:

Kerberos authentication occasionally crashes runtime
Allow $external special database to be used
Handle pre-2.6 upserted identifier
Altered ObjectId generation to take into account the AppDomain
Added 2.6 extended json support to JsonReader
SetMaxScan rendered $maxscan instead of $maxScan
Updated output of JsonWriter to include 2.6 extended json support
Replica set tags GetHashCode was calculated improperly

Compatibility Changes

There were no intentional backwards breaking changes. If you come across any,
please inform us as soon as possible by email dotnetdriver@mongodb.com or by reporting
an issue at jira.mongodb.com.