Releases: mongodb/mongo-csharp-driver
.NET Driver Version 3.8.0 Release Notes
This is the general availability release for the 3.8.0 version of the driver.
The main new features in 3.8.0 include:
Important
Added support for MongoDB ’s Intelligent Workload Management (IWM) and ingress connection rate limiting features. The driver now gracefully handles write-blocking scenarios and optimizes connection establishment during high-load conditions to maintain application availability. More details in CSHARP-5802: Client Backpressure Support
- CSHARP-5882: Support storedSource in vector search indexes and returnStoredSource in $vectorSearch queries
- CSHARP-5769: Implement hasAncestor, hasRoot, and returnScope for Atlas Search
- CSHARP-5646: Implement vector similarity match expressions
- CSHARP-5762: MongoDB Vector Search now supports vector search against nested embeddings and arrays of embeddings.
- CSHARP-5884: Add new fields for Auto embedding in Atlas Vector search indexes
MongoDB v8.3 Compatible Features:
- CSHARP-5852: Expression to determine the subtype of BinData field
- CSHARP-5713: Allow native conversion from string to BSON object
- CSHARP-5949: $convert should allow any type to be converted to string
- CSHARP-5818: Allow users to generate a hash from a UTF-8 string or binary data
- CSHARP-5950: Support base conversion in $convert
- CSHARP-5847: Support Select/SelectMany/Where index overloads in LINQ provider
- CSHARP-5828: Add Rerank stage builder
- CSHARP-5656: Support Aggregation Operator to generate random object ids
- CSHARP-5973: Support SkipWhile/TakeWhile index overloads in LINQ provider
- CSHARP-5825: Support (de)serialization between BSON and EJSON
- CSHARP-5655: Support regular expressions in $replaceAll search string and $split delimiter
Improvements:
- CSHARP-5887: Simplify retryable read and writes
- CSHARP-2593: Add numeric error code to default error message in NativeMethods.CreateException
- CSHARP-2150: Add check that the serializer's ValueType matches the type when registering the serializer
Fixes:
- CSHARP-5947: Increase SingleServerReadBinding timeout
- CSHARP-2862: Check that max pool size is never less than min pool size in connection string
- CSHARP-5935: Command activities may be skipped when using pooled connection
- CSHARP-5952: SerializerFinder resolve wrong serializer for BsonDocument members
Maintenance:
- CSHARP-5957: Bump maxWireVersion to 9.0
The full list of issues resolved in this release is available at CSHARP JIRA project.
Documentation on the .NET driver can be found here.
.NET Driver Version 3.7.1 Release Notes
This is a patch release that contains fixes and stability improvements:
- CSHARP-5916: ExpressionNotSupportedException when a $set stage expression references a member of a captured constant
- CSHARP-5918: ExpressionNotSupportedException when a $set stage expression uses ToList method
- CSHARP-5917: Mql.Field should lookup for default serializer if null is provided as a bsonSerializer parameter
- CSHARP-5920: SerializerFinder wrapping serializer into Upcast/Downcast serializer breaks some expressions translation
- CSHARP-5905: Fix bug when using EnumRepresentationConvention or ObjectSerializerAllowedTypesConvention
- CSHARP-5928: LINQ Provider throws misleading exception if expression translation is not supported
- CSHARP-5929: Improve SerializerFinder to proper handling of IUnknowableSerializer
The full list of issues resolved in this release is available at CSHARP JIRA project.
Documentation on the .NET driver can be found here.
.NET Driver Version 3.7.0 Release Notes
This is the general availability release for the 3.7.0 version of the driver.
The main new features in 3.7.0 include:
- CSHARP-3124: OpenTelemetry implementation
- CSHARP-5736: Expose atClusterTime parameter in snapshot sessions
- CSHARP-5805: Add support for server selection's deprioritized servers to all topologies
- CSHARP-5712: WithTransaction API retries too frequently
- CSHARP-5836: Support new Reverse with array overload introduced by .NET 10
- CSHARP-4566: Support filters comparing nullable numeric or char field to constant
- CSHARP-5606: Support ConvertChecked as well as Convert
Improvements:
- CSHARP-5841: Rewrite $elemMatch with $or referencing implied element due to server limitations
- CSHARP-5572: Implement new SerializerFinder
- CSHARP-5861: Use ConnectAsync in synchronous code-path to avoid dead-locks
- CSHARP-5876: Convert some disposer classes to structs
- CSHARP-5889: Optimize comparison with nullable constant translation
- CSHARP-5890: Avoid byte array allocations writing Int64, Double, Decimal128 in ByteBufferStream
- CSHARP-5888: Optimize CommandEventHelper to avoid redundant message decoding
Fixes:
- CSHARP-5564: Enum with ushort underlying type is not serialized correctly
- CSHARP-5654: String.IndexOf comparisons to -1 return incorrect results
- CSHARP-5866: Avoid raising ClusterDescriptionChangedEvent on unchanged DNS records update
- CSHARP-5850: Use of an untranslatable property reference in a LINQ expression should be executed client-side
- CSHARP-5863: The built-in
IPAddressSerializerthrows when usingIPAddress.Any, etc - CSHARP-5877: Fix First/Last field path in GroupBy optimizer when source is wrapped
- CSHARP-5894: Deadlock during concurrent BsonClassMap initialization
The full list of issues resolved in this release is available at CSHARP JIRA project.
Documentation on the .NET driver can be found here.
.NET Driver Version 3.6.0 Release Notes
This is the general availability release for the 3.6.0 version of the driver.
The main new features in 3.6.0 include:
- CSHARP-5717: Typed builders for vector indexes
- CSHARP-5812: Support lexical prefilters for vector search
- CSHARP-5763: Auto-embedding for vector search
- CSHARP-5737: Add legacy representation for TimeOnly
- CSHARP-5705: Use standard RID paths in MongoDB.Driver.Encryption packaging
- CSHARP-5730: Support static String.Compare method
- CSHARP-1913: Support using Dictionary fields as IEnumerable<KeyValuePair<TKey, TValue>>
- CSHARP-5779: Support Dictionary Keys and Values properties
- CSHARP-5786: Add Decimal128 ctor overload for byte/short, for compatibility with net10
- CSHARP-5793: Map MemoryExtensions Contains and SequenceEqual with null comparer to Enumerable methods with no comparer parameter
- CSHARP-5749: Support C# 14 changes that result in overloads now binding MemoryExtensions extension methods
Improvements:
- CSHARP-5675: Where possible, return null for average over the empty set
- CSHARP-5666: Remove GetBitArray allocations in BsonClassMapSerializer.DeserializeClass
- CSHARP-5748: Use KeyValuePairSerializer consistently for KeyValuePair
- CSHARP-5663: Avoid RentedBuffer boxing in DisposableSegment
- CSHARP-5734: Update doc comments for IBsonIdProvider GetDocumentId method
- CSHARP-5348: Avoid allocations for Bson*Context
- CSHARP-5628: Add new boolean expression simplifications to PartialEvaluator
- CSHARP-5632: Consolidate driver project Type extension methods in Misc\TypeExtensions.cs
- CSHARP-5785: Optimize LINQ translation for First() and FirstOrDefault() methods with predicates
- CSHARP-5667: Switch to 'for' loop in BsonClassMapSerializer.SerializeClass to reduce allocations
- CSHARP-5807: Add benchmarks with strong-typed POCOs
Fixes:
- CSHARP-5725: C# driver stopped working with Unity since v3.2.0
- CSHARP-5757: The problem of filtering by derived types
Maintenance:
- CSHARP-3984: Remove BinaryConnection.DropBox
- CSHARP-5744: Fix interruptInUse flaky tests
The full list of issues resolved in this release is available at CSHARP JIRA project.
Documentation on the .NET driver can be found here.
.NET Driver Version 3.5.2 Release Notes
Important
.NET 10 / C# 14
If you are targeting .NET 10 or using C# 14 in your project you should upgrade to this release as soon as possible as it contains important compatibilty fixes.
Projects targeting prior versions of .NET or not using C# 14 can upgrade at their convenience.
This is a patch release that contains fixes and stability improvements:
- CSHARP-5793: Map MemoryExtensions Contains and SequenceEqual with null comparer to Enumerable methods with no comparer parameter
The full list of issues resolved in this release is available at CSHARP JIRA project.
Documentation on the .NET driver can be found here.
.NET Driver Version 3.5.1 Release Notes
This is a patch release that contains fixes and stability improvements:
- CSHARP-5777: Avoid ThreadPool-dependent IO methods in sync API
- CSHARP-5743: Version 3.5 causes delays and disruptions because it is trying to access a disposed semaphore slim
- CSHARP-5749: Support C# 14 changes that result in overloads now binding MemoryExtensions extension methods
- CSHARP-5786: Add Decimal128 byte constructor overload (net10 compat)
The full list of issues resolved in this release is available at CSHARP JIRA project.
Documentation on the .NET driver can be found here.
.NET Driver Version 3.5.0 Release Notes
This is the general availability release for the 3.5.0 version of the driver.
Important
Internal Changes for an Upcoming Feature
This release includes low level changes to internal subsystems including operation execution, timeout handling, and resource cleanup logic - in preparation for supporting Client-Side Operations Timeout (CSOT) in an upcoming release.
While these changes should be backward-compatible and not alter existing behavior, they touch core driver infrastructure.
If you experience unexpected issues such as:
- Operations timing out unexpectedly or not timing out when expected
- Unusual delays or hangs in database calls
- Differences in command cancellation behavior
Please let us know via the MongoDB JIRA Driver project or your MongoDB support channel, providing driver logs and a reproduction if possible.
Experimental Support for Queryable Encryption Text Field Prefix, Suffix and Substring Queries
Substring, prefix and suffix search for Queryable Encryption are in preview and should be used for experimental workloads only. These features are unstable and their security is not guaranteed until released as Generally Available (GA). The GA version of these features may not be backwards compatible with the preview version.
The main new features in 3.5.0 include:
- CSHARP-5453: Add builder for CSFLE schemas
- CSHARP-3222: Add LINQ support for median and percentile accumulators/window functions
- CSHARP-5672: Support sorting by value in PushEach operation
- CSHARP-5625: Support text indexes for explicit and automatic encryption
- CSHARP-734: SOCKS5 Proxy Support
- CSHARP-3458: Extend IAsyncCursor and IAsyncCursorSource to support IAsyncEnumerable
Improvements:
- CSHARP-5603: Add Big Endian support in BinaryVectorReader and BinaryVectorWriter
- CSHARP-5614: Fix deserialization of primitive arrays on Big Endian systems
- CSHARP-5619: Replace IConnection.SendMessages with the method to send a single message
- CSHARP-5377: Eliminate unnecessary killCursors command when batchSize == limit
Fixes:
- CSHARP-3435: FilterDefinition Inject method should use root serializer
- CSHARP-3662: MongoClientSettings.SocketTimeout does not work for values under 500ms on Windows for sync code
- CSHARP-4040: Fix bug when using field with same element name as discriminator
- CSHARP-5587: FindOneAndUpdate should insert correct discriminator value on upsert
- CSHARP-3494: Fix discriminator for generic types
- CSHARP-5588: Unable to select KeyValuePair Key when using camelCase convention
- CSHARP-5633: BsonSerializer.IsTypeDiscriminated is not thread-safe
Maintenance:
- CSHARP-5596: Remove unused *OpcodeOperation classes
- CSHARP-5617: Remove unused IChannel.Query methods
- CSHARP-5547: Remove support for MongoDB 4.0
The full list of issues resolved in this release is available at CSHARP JIRA project.
Documentation on the .NET driver can be found here.
.NET Driver Version 3.4.3 Release Notes
This is a patch release that contains fixes and stability improvements:
- CSHARP-5697: Fix Client.BulkWrite failure in case complex type is being used as Document's Id
The full list of issues resolved in this release is available at CSHARP JIRA project.
Documentation on the .NET driver can be found here.
.NET Driver Version 3.4.2 Release Notes
This is a patch release that contains fixes and stability improvements:
- CSHARP-5661: Fix UnobservedTaskException on socket connecting timeout
The full list of issues resolved in this release is available at CSHARP JIRA project.
Documentation on the .NET driver can be found here.
Upgrading
There are no known backwards breaking changes in this release.
.NET Driver Version 3.4.1 Release Notes
This is a patch release that addresses some issues reported since 3.4.0 was released:
- CSHARP-5588 Fix issue with conventions being ignored when using KeyValuePair in LINQ
- CSHARP-5633 Fix thread safety issue with BsonSerializer.IsTypeDiscriminated
The list of JIRA tickets resolved in this release is available at CSHARP JIRA project.
Documentation on the .NET driver can be found here.
Upgrading
There are no known backwards breaking changes in this release.