MongoDB + .NET Core 1.0?

therefore, I am working on a backend application with .NET Core 1.0 and have a lot of work already in progress. I assume that my own error is not checked in advance, but apparently the latest version of the MongoDB C # driver (2.2.4) is not compatible with .NET Core 1.0?

I get these errors for all relevant dependencies:

The dependency MongoDB.Bson 2.2.4 does not support framework .NETCoreApp,Version=v1.0.  

I came across this guide on how to make it work with RC2, but we went a bit past this point (I would not want to use the release candidate version for such a real project): http://blog.stoverud.no/posts / referencing-net451-libraries-in-aspnet-core /

The above guide does not work for me. Adding a frame to the "frames" in the JSON project file simply creates another unsupported error, similar to the previous one.

Is there a way to do this, or should I look for another database? I do not know too many database projects. I need to use NoSQL.

+4
source share
2 answers

Update:

Version 2.3.0 is officially released and compatible with .NET Core 1.0, so I think this question is no longer relevant. https://www.nuget.org/packages/MongoDB.Driver/2.3.0


Old answer:

Version 2.3.0 is currently in beta testing, and I was able to add it to the main .net application, I did not work much with it, so I do not know the current limitations / errors.

Add the dependency to the project.json file:

 "MongoDB.Driver.Core": "2.3.0-beta1"

NuGet MongoDB.Driver.Core.

, , : https://jira.mongodb.org/browse/CSHARP-1177

+12
0

Source: https://habr.com/ru/post/1650585/


All Articles