Mongocsharpdriver无法与ASP:NET Core 5.0(vNext)一起使用? [英] Mongocsharpdriver not working with ASP:NET Core 5.0 (vNext)?

查看:57
本文介绍了Mongocsharpdriver无法与ASP:NET Core 5.0(vNext)一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我开始使用ASP.NET 5.0,并想开始使用MongoDB.

So I'm getting my feet wet with ASP.NET 5.0, and want to start off using MongoDB.

我已经在多个项目中做到了,只是之前没有在vNext中完成.

I've done this in several projects, just not in vNext before.

我将"mongocsharpdriver"添加到project.json,一切似乎都很好,但是当我编译时,我遇到了一些关于mongo和ASP.NET 5 Core的错误(类型或名称空间名称"MongoDB"不能是成立 ...).对于常规ASP.NET 5,仅对于Core,没有编译错误.mongocsharpdriver不支持Core吗?它似乎没有任何依赖关系,但是,当然,我不希望mongo团队现在还可以针对Core对其进行编译.

I add the "mongocsharpdriver" to the project.json and everything seems fine, but when I compile, I get a bunch of errors about mongo and ASP.NET 5 Core (The type or namespace name 'MongoDB' could not be found ...). No compile errors for regular ASP.NET 5, just for Core. Is mongocsharpdriver not support for Core? It doesn't seem to have any dependencies, but of course, I don't expect the mongo team to have it compile against Core just yet.

我已经查看了这个问题在VNext中设置MongoDB ,但是没有确实对我有帮助,因为我也想保持项目为Core编译!

I've looked at this question Setup MongoDB in VNext, but it doesn't really help me, as I want to keep the project compiling for Core too!

有输入吗?

推荐答案

MongoDB不支持CoreCLR( aspnetcore50 ).看到我引用为重复的问题.

MongoDB does not have support for CoreCLR (aspnetcore50). See the question I referenced as duplicate.

目前唯一的解决方案是不针对CoreCLR进行编译,或者在该框架上使用另一个DB.

The only solution for now is to not compile for CoreCLR or, on that framework, use another DB.

这篇关于Mongocsharpdriver无法与ASP:NET Core 5.0(vNext)一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆