I am using Assembly MongoDB.Driver version 2.27 in my C# code (Targeting to netstandard2.1 as need some backward compatibility for older codebase). When I am changing version of Assembly MongoDB.Driver to 3.2 (Which is newer version), it generates following compile time error. What could be the issue ?
Error: The type or namespace name 'IMongoQueryable<>' could not be found (are you missing a using directive or an assembly reference?)
Please note that Version 3.2.1 is much newer version and I have checked the compatibility. This can be found here :
My Database Server version is 7.0.16.
I have found few links that says that MongoDB Driver upgrade 3.x has some LINQ Support issues but did not get concrete information around it.
Can someone please help me to upgrade MongoDB Driver to latest version 3.2.1?
I am using Assembly MongoDB.Driver version 2.27 in my C# code (Targeting to netstandard2.1 as need some backward compatibility for older codebase). When I am changing version of Assembly MongoDB.Driver to 3.2 (Which is newer version), it generates following compile time error. What could be the issue ?
Error: The type or namespace name 'IMongoQueryable<>' could not be found (are you missing a using directive or an assembly reference?)
Please note that Version 3.2.1 is much newer version and I have checked the compatibility. This can be found here : https://www.mongodb/docs/drivers/csharp/current/compatibility/#std-label-csharp-compatibility-tables
My Database Server version is 7.0.16.
I have found few links that says that MongoDB Driver upgrade 3.x has some LINQ Support issues but did not get concrete information around it.
Can someone please help me to upgrade MongoDB Driver to latest version 3.2.1?
Share Improve this question asked Mar 20 at 9:34 Creative LearnerCreative Learner 233 bronze badges1 Answer
Reset to default 1Typically, when you upgrade a driver from 2.x to 3.x, there are breaking changes. This is called semantic versioning. According to the mongo db documentation found here this is the possible cause:
The driver replaces the
IMongoQueryable
interface with theIQueryable
interface, following the pattern used by most other LINQ providers. If your application contains references toIMongoQueryable
, replace them withIQueryable
.