MongoDB.Driver.MongoIncompatibleDriverException:

Nagireddi, Vijaya (US - Texas) 0 Reputation points
2025-12-02T20:59:38.6233333+00:00

MongoDB.Driver.MongoIncompatibleDriverException using C# mongodb driver

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
{count} votes

1 answer

Sort by: Most helpful
  1. Surya Amrutha Vaishnavi Lanka (INFOSYS LIMITED) 1,115 Reputation points Microsoft External Staff
    2025-12-03T11:47:07.5366667+00:00

    Thanks for sharing!
    The error MongoDB.Driver.MongoIncompatibleDriverException occurs because the MongoDB C# driver version currently installed in your application is not compatible with your MongoDB server version.

    Here are some steps which are helpful

    1. Open your MongoDB shell or Compass and run db.version(), note the server version shown.
    2. Open the project in Visual Studio or your code editor).
    3. Open Package Manager Console (or use terminal).
    4. Update the MongoDB C# driver to a version that matches your server. Use one of these commands:

    Visual Studio : Update the package MongoDB.Driver -Version 2.14.1

    .NET CLI (terminal): dotnet add package MongoDB.Driver -version 2.14.1

    1. In the project: Clean the solution, then Rebuild the solution.
    2. Restart the application.
    3. Test the connection again.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.