本文介绍了EntityFramework 6.0与Standard .Net 2.0库的兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,

我有一个项目,我需要在其他项目之间共享库。

项目的一个是库EFDB ,它使用Entity framework 6.0和目标.net 4.6,它没有做任何其他的获取SQL服务器数据库模型。

I have a project where I need to share library between other project.
On of the project is a library EFDB which use Entity framework 6.0 and target .net 4.6 which does nothing else that getting a SQL server database model.

然后我有一个目标.Net标准的其他库2.0,我需要共享的公共类使用DBcontext从EFDB库中收集db实体。

为了使所有引用都正确我开始将Entity Frawork 6.0添加到.Net标准2.0库通过Nuget包但后面引用时我收到警告:

Then I have an other library targeting .Net Standard 2.0, in which I have common classes that I need to share which are using the DBcontext to collect db entities from EFDB library.
IN order to get all reference correct I start to Add Entity Frawork 6.0 into by .Net standard 2.0 library through Nuget package but then I get a warning after referencing it as below :

Warning	NU1701	Package 'EntityFramework 6.0.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.

我可以做的任何事情都可以通过EF6.0获得.net标准2.0的支持吗?

Is tehre anything I can do do get .net standard 2.0 cmpatible with EF6.0 ?

如何使用EF 6.0共享我的库EFDB以便在我的标准.net库中使用?

How can I share my library EFDB using EF 6.0 in order to be used in my standard .net library ?

为您的建议提供帮助

关注

推荐答案


这篇关于EntityFramework 6.0与Standard .Net 2.0库的兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 08:22