How can I use MongoDB c# Driver for an assembly using NET 4.5?
Hi @Winnie_Pooh,
Per the C#/.NET Language Compatibility reference, the most recent version of the C# driver compatible with .NET 4.5 is 2.13. Note: this also requires .NET Framework 4.5.2 or higher.
If you are still having trouble connecting, please provide more information:
- Version of MongoDB C#/.NET driver
- Version of .NET framework
- Version of MongoDB server
- Description of problem encountered including relevant error messages or code snippet to help reproduce the issue
Regards,
Stennie
Hey Stennie,
I am going to create SQLCLR functions for work with MongoDB.
SQL Server supports NET 4.5.
In other words I need compile my dll +NET 4.5 and then move it to SQL Server.
I tried to change NET for my assembly 4.8->4.5 but it does not compile because MongoDB driver NuGets are not comptaible.
- I use the latest MongoDB Driver and the freshest MongoDB
Hi @Winnie_Pooh,
The latest MongoDB C#/.NET driver (2.14) requires .NET Framework 4.8.
Per my earlier note, the most recent version of the driver you can use with .NET 4.5 Framework is the MongoDB C#/.NET 2.13 driver. The 2.13 driver is compatible will all current production versions of MongoDB server (4.0 through 5.0).
Regards,
Stennie
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.