NET Driver 2.23.0 Released

.NET Driver Version 2.23.0 Release Notes

This is the general availability release for the 2.23.0 version of the driver.

The main new features in 2.23.0 include:

The full list of issues resolved in this release is available at CSHARP JIRA project.

Documentation on the .NET driver can be found here.

updating the nuget package results in an exception because the MongoClientSettings has no LoggingSettings set in my case.

head of the stack trace:

System.ArgumentNullException: Value cannot be null. (Parameter 'factory')
   at System.ThrowHelper.Throw(String paramName)
   at Microsoft.Extensions.Logging.LoggerFactoryExtensions.CreateLogger[T](ILoggerFactory factory)
   at MongoDB.Driver.Core.Clusters.ClusterFactory.<ProcessClusterEnvironment>g__LogIfExternalEnvironment|9_2(String host, String environment, String documentationUrl, String[] suffixes)
   at MongoDB.Driver.Core.Clusters.ClusterFactory.<ProcessClusterEnvironment>g__LogIfCosmosDB|9_0(String host)
   at MongoDB.Driver.Core.Clusters.ClusterFactory.ProcessClusterEnvironment(ClusterSettings settings)
   at MongoDB.Driver.Core.Clusters.ClusterFactory.CreateCluster()
   at MongoDB.Driver.Core.Configuration.ClusterBuilder.BuildCluster()
   at MongoDB.Driver.ClusterRegistry.CreateCluster(ClusterKey clusterKey)
   at MongoDB.Driver.ClusterRegistry.GetOrCreateCluster(ClusterKey clusterKey)
   at MongoDB.Driver.MongoClient..ctor(MongoClientSettings settings)

i can fix that with:
mongoClientSettings.LoggingSettings = new(new LoggerFactory());

but this seems not te be excpected behaviour to me. :slight_smile:

Thank you for your feedback.
Yes, you are right, this is not the expected behavior. We already working on the fix. Please refer to the CSHARP-4870 Jira ticket for more updates.

Thanks for reporting this issue.
CSHARP-4870 was fixed in 2.23.1.

thanks for the fix, if you already read my previous answer, i just did not update all packages right in the first try.

the version 2.23.1 does fix it!

thank you! :slight_smile:

This topic was automatically closed after 90 days. New replies are no longer allowed.