mongodb and dnxcore50 is not (yet) supported

mongodb and dnxcore50

Overview

I’m trying to build the most crazy technology stack ever. I planned to integrate my ASP.NET Core Microservice with MongoDb. Unfortunately MongoDb .NET Driver 2.2.3 still doesn’t support CoreClr. So you can’t use mongodb and dnxcore50.
You can still use it with full .NET, but it’s not fun.

MongoDb and dnxcore50

Changes required for project.json:


  "dependencies": {    
    "Microsoft.AspNet.Server.Kestrel": "1.0.0-*",
    "Microsoft.AspNet.Mvc": "6.0.0-rc1-final",   
    "Microsoft.AspNet.Cors": "6.0.0-rc1-final",
    "MongoDB.Driver": "2.2.3"
  },

Now you need to restore and build.

$ dnu restore
$ dnu build

However the result is obvious:


project.json(0,0): error NU1002: The dependency MongoDB.Bson 2.2.3 in project userService does not support framework DNXCore,Version=v5.0.
project.json(11,23): error NU1002: The dependency MongoDB.Driver 2.2.3 in project userService does not support framework DNXCore,Version=v5.0.
project.json(0,0): error NU1002: The dependency MongoDB.Driver.Core 2.2.3 in project userService does not support framework DNXCore,Version=v5.0.

Summary

Mongo team is working on it, but they are waiting for .NET Core RC2, which will be soon!
Till now you can try with dnxcore451, but I believe it’s worth waiting. I’ll keep you posted.

Leave a Reply

Your email address will not be published. Required fields are marked *