简体   繁体   中英

EF6.2 was restored using .netFramework version 4.6.1 instead of the project target framework .NETStandard v2.0

I created a brand new .NETStandard project library and the target framework is the .NETStandard v2.0

I installed Entity Framework 6.2 but I'm getting the error indicating that this package may not be fully compatible with your project.

When I'm trying to update packages, I'm getting this:

Package 'EntityFramework 6.0' was restored using '.NETFramework, Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'

Are there anything I can do to solved this problem? or There is no way to use Entity Framework 6.2 (6.1.3) in a .NETStandard 2.0 project ?

I'm using VS2017

在此处输入图片说明

EF6 is not fully compatible with .NETStandard, so you should use EF Core in .NETStandard projects.

But if you only use that project in .NETFramework, it will work, but it may not work in other frameworks (.NETCore, Xamarin).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM