MongoDB.live, free & fully virtual. June 9th - 10th. Register Now

Error installing .net driver for .net core project

When I try and install MongoDB.Driver with NuGet in Visual Studio 2019 I get the following error:

Error Could not install package ‘runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.2’. You are trying to install this package into a project that targets ‘.NETCoreApp,Version=v2.1’, but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Hi @Ian_Blakeley,

Can you check which MongoDB.Driver was installed, I’ve just tested with a new Dotnet Core app with the latest driver [2.10.3] and it’s working fine reading a list of collections from an existing Atlas database for me.

The only difference I can see at the moment is my Dotnet Core is 3.1.201 and the error above is referencing 2.1.

The error occurs when I am trying to install MongoDB.Driver (ver 2.10.3) ie I am unable to install the driver… my project is .net core 3.1.201