MongoDB.Bson 3.0.0 requires .NET standard 2.1 but .NET framework does not support .NET standard.dll 2.1. Yet Nuget allows upgrading to MongoDB.Bson 3.0.0 for .NET Framework 8 projects.
Hi, Markus,
MongoDB .NET/C# Driver 3.0.0 supports net472
(AKA full framework), netstandard2.1
(AKA .NET Core 3.X), and net6
(AKA .NET 6+). If you are compiling for .NET 8, it will use the net6
assemblies. If you are compiling for .NET Framework, it will use the net472
assemblies. If you are compiling for .NET Core 3.X or .NET 5, then the netstandard2.1
assemblies will be used.
In summary, the 3.0.0 driver is compatible with .NET 8 and your C# compiler and toolchain will use the correct assemblies contained in our NuGet packages to target the desired framework.
Please let us know if you have any additional questions or concerns.
Sincerely,
James
I am able to use 3.0.0 with .NET Framework 8 successfully. But when we deployed and tested it didn’t log any records in mongo db. Then reverted back to 2.19.0
@James_Kovacs, are there any plans to support .netstandard2.0?
Parts of our application are net472 and others are net8, so we have a shared class library that targets netstandard2.0 containing all of our mongodb code (so that it can be used by net472 and net8). This worked well for us up until the 3.0.0 update (which no longer supports this scenario)
Any information would be greatly appreciated, thanks.
New & Unread Topics
Topic | Replies | Views | Activity |
---|---|---|---|
QT 6.6.3 build errors with latest Mongo CXX drivers Windows 11 | 2 | 636 | May 2024 |
Proper way to write a BsonArray to BsonBinaryWriter | 0 | 275 | Jul 2024 |
Not able to connect to local instance with .net when tls is turned on | 1 | 45 | Sep 2024 |
Unable to Connect Looker Studio to MongoDB Atlas Using Atlas SQL (Without Enabling BI Connector) | 4 | 147 | 1d |
Shared serializer configuration between EF Provider and bare Driver | 0 | 25 | Jan 21 |